diff options
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/import.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index fb2de5dc0..be96ef42c 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -159,7 +159,7 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response) | |||
159 | thumbnailModel = await processThumbnail(req, video) | 159 | thumbnailModel = await processThumbnail(req, video) |
160 | 160 | ||
161 | // Process video thumbnail from url if processing from request.files failed | 161 | // Process video thumbnail from url if processing from request.files failed |
162 | if (!thumbnailModel) { | 162 | if (!thumbnailModel && youtubeDLInfo.thumbnailUrl) { |
163 | thumbnailModel = await processThumbnailFromUrl(youtubeDLInfo.thumbnailUrl, video) | 163 | thumbnailModel = await processThumbnailFromUrl(youtubeDLInfo.thumbnailUrl, video) |
164 | } | 164 | } |
165 | 165 | ||
@@ -169,7 +169,7 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response) | |||
169 | previewModel = await processPreview(req, video) | 169 | previewModel = await processPreview(req, video) |
170 | 170 | ||
171 | // Process video preview from url if processing from request.files failed | 171 | // Process video preview from url if processing from request.files failed |
172 | if (!previewModel) { | 172 | if (!previewModel && youtubeDLInfo.thumbnailUrl) { |
173 | previewModel = await processPreviewFromUrl(youtubeDLInfo.thumbnailUrl, video) | 173 | previewModel = await processPreviewFromUrl(youtubeDLInfo.thumbnailUrl, video) |
174 | } | 174 | } |
175 | 175 | ||
@@ -236,7 +236,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You | |||
236 | remote: false, | 236 | remote: false, |
237 | category: body.category || importData.category, | 237 | category: body.category || importData.category, |
238 | licence: body.licence || importData.licence, | 238 | licence: body.licence || importData.licence, |
239 | language: body.language || undefined, | 239 | language: body.language || importData.language, |
240 | commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true" | 240 | commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true" |
241 | downloadEnabled: body.downloadEnabled !== false, | 241 | downloadEnabled: body.downloadEnabled !== false, |
242 | waitTranscoding: body.waitTranscoding || false, | 242 | waitTranscoding: body.waitTranscoding || false, |