Conversation
|
Hey, I tested this locally and noticed it only fetches the first video from a playlist URL rather than all videos. I have a working implementation in #27 that fetches the full playlist by removing --no-playlist from both get_info() and run_download() and parsing the multiple JSON lines yt-dlp returns. Feel free to check it out! |
|
@Ranjesh2002 I've updated the implementation to also detect and expand those cases. Could you try it again when you have a moment? |
|
One advantage of expanding the playlist upfront (as in my approach) is that it may make future enhancements easier. For example:
Just wanted to share this as a possible benefit from a future extensibility/UX perspective. |
…an#14 — cookies, playlist, AAC, GIF, batch download - averygan#25: cookies.txt support (COOKIES_FILE auto-detected, passed to all yt-dlp calls) - averygan#28: YouTube playlist expansion via /api/playlist endpoint (flat-playlist -J) - averygan#29: Force AAC audio codec (-S acodec:aac) for all video/audio downloads - averygan#20: GIF export via ffmpeg 2-pass palettegen/paletteuse, 15fps, max 480px width - averygan#14: Batch download via /api/batch/download + /api/batch/status, ThreadPoolExecutor(3), parallel Download All
|
Just tested with the watch?v=xxx&list=xxx format too, my implementation in #27 handles it correctly and expands all 13 videos without any additional URL detection logic. Since --no-playlist is removed entirely, yt-dlp naturally expands any URL containing a playlist parameter. No special casing needed! |
Summary
This pull request adds support for handling YouTube playlist URLs by expanding them into individual video URLs before processing. (fixes #9)
Changes
Backend
/api/playlistPOST endpoint inapp.pyyt-dlp --flat-playlist -J <url>to retrieve playlist entries (without format data)Frontend
templates/index.htmlto detect YouTube playlist URLs/api/playlistendpoint when a playlist URL is detectedResult
Difference from #27
This PR improves the following points compared to #27:
/api/infoprocessing time was too longyt-dlpbehavior, fetching an entire playlist at once is slowUsers could not see progress clearly