mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-12 19:37:29 +00:00
Tip: Don't code at 1 AM
- Remove console.log - Default value for render video locals
This commit is contained in:
parent
bb4816c4b3
commit
c83bdcb924
@ -36,7 +36,7 @@ function formatOrder(format) {
|
||||
return -total
|
||||
}
|
||||
|
||||
async function renderVideo(videoPromise, {user, id, instanceOrigin}, locals) {
|
||||
async function renderVideo(videoPromise, {user, id, instanceOrigin}, locals = {}) {
|
||||
try {
|
||||
// resolve video
|
||||
const video = await videoPromise
|
||||
|
@ -59,8 +59,7 @@ function normaliseVideoInfo(video) {
|
||||
function tToMediaFragment(t) {
|
||||
let resolved = ""
|
||||
|
||||
console.log(t)
|
||||
if (!t || t.length > 10) { // don't parse missing values, don't pass too long strings
|
||||
if (!t || t.length > 10) { // don't parse missing values, don't parse too long strings
|
||||
// skip processing
|
||||
} else if (t.match(/^[0-9.,]+$/)) {
|
||||
resolved = t
|
||||
|
Loading…
Reference in New Issue
Block a user