Skip to content

Commit

Permalink
Don't add media prefix to getFilename()
Browse files Browse the repository at this point in the history
  • Loading branch information
toresbe committed Jul 13, 2023
1 parent 8b683b5 commit c9f9aef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/scheduling/ScheduledVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ export class ScheduledVideo implements ScheduleItem {

getFilename() {
const asset = this.entry.video.media!.assets!.find(
({ type }) => type === "broadcastable",
({ type }) => type === "broadcastable"
)?.url;

if (typeof asset === "undefined") {
const fallback = this.entry.video.media!.assets!.find(
({ type }) => type === "webm",
({ type }) => type === "webm"
)?.url;

if (typeof fallback === "undefined") {
throw new Error(`No broadcastable or webm asset for "${this.label}"`);
}

log.error(`No broadcastable asset for "${this.label}", using webm`)
log.error(`No broadcastable asset for "${this.label}", using webm`);

return CASPAR_MEDIA_URL_PREFIX + fallback;
return fallback;
}

return CASPAR_MEDIA_URL_PREFIX + asset;
return asset;
}

loadbg = async () => {
Expand Down

0 comments on commit c9f9aef

Please sign in to comment.