aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl/youtube-dl-cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/youtube-dl/youtube-dl-cli.ts')
-rw-r--r--server/helpers/youtube-dl/youtube-dl-cli.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/youtube-dl/youtube-dl-cli.ts b/server/helpers/youtube-dl/youtube-dl-cli.ts
index 508055b85..fc4c40787 100644
--- a/server/helpers/youtube-dl/youtube-dl-cli.ts
+++ b/server/helpers/youtube-dl/youtube-dl-cli.ts
@@ -142,6 +142,11 @@ export class YoutubeDLCLI {
142 }): Promise<{ upload_date: string, webpage_url: string }[]> { 142 }): Promise<{ upload_date: string, webpage_url: string }[]> {
143 const additionalYoutubeDLArgs = [ '--skip-download', '--playlist-reverse' ] 143 const additionalYoutubeDLArgs = [ '--skip-download', '--playlist-reverse' ]
144 144
145 if (CONFIG.IMPORT.VIDEOS.HTTP.YOUTUBE_DL_RELEASE.NAME === 'yt-dlp') {
146 // Optimize listing videos only when using yt-dlp because it is bugged with youtube-dl when fetching a channel
147 additionalYoutubeDLArgs.push('--flat-playlist')
148 }
149
145 if (options.latestVideosCount !== undefined) { 150 if (options.latestVideosCount !== undefined) {
146 additionalYoutubeDLArgs.push('--playlist-end', options.latestVideosCount.toString()) 151 additionalYoutubeDLArgs.push('--playlist-end', options.latestVideosCount.toString())
147 } 152 }