Skip to content

Commit

Permalink
Fix for null thumbnail URL
Browse files Browse the repository at this point in the history
  • Loading branch information
snobu committed May 11, 2021
1 parent 918aadc commit 7d91f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type Video = {
outPath: string;
totalChunks: number; // Abstraction of FFmpeg timemark
playbackUrl: string;
posterImageUrl: string;
posterImageUrl: string | null;
captionsUrl?: string
}

Expand Down
4 changes: 3 additions & 1 deletion src/destreamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ async function downloadVideo(videoGUIDs: Array<string>, outputDirectories: Array
const headers: string = 'Authorization: Bearer ' + session.AccessToken;

if (!argv.noExperiments) {
await drawThumbnail(video.posterImageUrl, session);
if (video.posterImageUrl) {
await drawThumbnail(video.posterImageUrl, session);
}
}

const ffmpegInpt: any = new FFmpegInput(video.playbackUrl, new Map([
Expand Down

0 comments on commit 7d91f32

Please sign in to comment.