mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-22 15:47:30 +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
|
return -total
|
||||||
}
|
}
|
||||||
|
|
||||||
async function renderVideo(videoPromise, {user, id, instanceOrigin}, locals) {
|
async function renderVideo(videoPromise, {user, id, instanceOrigin}, locals = {}) {
|
||||||
try {
|
try {
|
||||||
// resolve video
|
// resolve video
|
||||||
const video = await videoPromise
|
const video = await videoPromise
|
||||||
|
@ -59,8 +59,7 @@ function normaliseVideoInfo(video) {
|
|||||||
function tToMediaFragment(t) {
|
function tToMediaFragment(t) {
|
||||||
let resolved = ""
|
let resolved = ""
|
||||||
|
|
||||||
console.log(t)
|
if (!t || t.length > 10) { // don't parse missing values, don't parse too long strings
|
||||||
if (!t || t.length > 10) { // don't parse missing values, don't pass too long strings
|
|
||||||
// skip processing
|
// skip processing
|
||||||
} else if (t.match(/^[0-9.,]+$/)) {
|
} else if (t.match(/^[0-9.,]+$/)) {
|
||||||
resolved = t
|
resolved = t
|
||||||
|
Loading…
Reference in New Issue
Block a user