playlist_index on youtube now semi-broken because youtube changed the way playlists are displayed #23607

Closed
opened 2026-02-21 12:53:01 -05:00 by deekerman · 1 comment
Owner

Originally created by @alkeryn on GitHub (Apr 29, 2021).

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2021.04.26
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

Wouldn't be very pertinent

Description

so now youtube won't display removed videos or unplayable videos within a playlist by default, even though they are still in the playlist and can be seen with the new "show unavailable videos" button.

so if you want an example, let's say i have 100 videos, then in those 100 videos 20 gets deleted from youtube but not from the playlist.

before, youtube-dl would still see the video even though it couldn't download it, and if you added a video to the playlist, the index of the new video would then be 101 (assuming you start at 1) as it would also count the deleted videos.

but since youtube changed the way it is displayed, downloading with youtube-dl will now result in the index being 81 (if 20 got deleted from youtube) instead of 101.

however youtube now added a button to also show the deleted video, so the data isn't missing alltogether, the scraper just needs to be updated i guess.

here you can see the new "show unavaillable videos" button.
image

so step to reproduce if you wanna do it.

have a playlist with some videos (ideally video you can delete).
download the playlist using this command

youtube-dl --playlist-reverse -f bestaudio/best --add-metadata --download-archive list.txt -cio '%(playlist_index)s-%(id)s %(title)s.%(ext)s' \
<playlist address> \
2>> errors.log

then add few videos to the playlist.
delete few videos that are in the playlist from youtube (without removing them from the playlist).

if you now click the "show unavailable videos" you'll still see them in the playlist.

but now if you run the command again to "sync" the playlist, you will see that the index is shifted because it no longer takes into account the videos that got removed from youtube (but are still in the playlist).

the flags in the provided example are probably not all necessary, but for reproduction purpose i provided the exact same command than my script uses.
it's kind of an annoying issue to reproduce as you need a playlist that got videos that got removed from youtube before syncing it again.

hoping it could help, and feel free to ask any questions.

Originally created by @alkeryn on GitHub (Apr 29, 2021). ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Read bugs section in FAQ: http://yt-dl.org/reporting - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a broken site support issue - [x] I've verified that I'm running youtube-dl version **2021.04.26** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar bug reports including closed ones - [x] I've read bugs section in FAQ ## Verbose log Wouldn't be very pertinent ## Description so now youtube won't display removed videos or unplayable videos within a playlist by default, even though they are still in the playlist and can be seen with the new "show unavailable videos" button. so if you want an example, let's say i have 100 videos, then in those 100 videos 20 gets deleted from youtube but not from the playlist. before, youtube-dl would still see the video even though it couldn't download it, and if you added a video to the playlist, the index of the new video would then be 101 (assuming you start at 1) as it would also count the deleted videos. but since youtube changed the way it is displayed, downloading with youtube-dl will now result in the index being 81 (if 20 got deleted from youtube) instead of 101. however youtube now added a button to also show the deleted video, so the data isn't missing alltogether, the scraper just needs to be updated i guess. here you can see the new "show unavaillable videos" button. ![image](https://user-images.githubusercontent.com/11599075/116641626-640c7700-a96d-11eb-94ea-37e0a961d0f0.png) so step to reproduce if you wanna do it. have a playlist with some videos (ideally video you can delete). download the playlist using this command ```bash youtube-dl --playlist-reverse -f bestaudio/best --add-metadata --download-archive list.txt -cio '%(playlist_index)s-%(id)s %(title)s.%(ext)s' \ <playlist address> \ 2>> errors.log ``` then add few videos to the playlist. delete few videos that are in the playlist from youtube (without removing them from the playlist). if you now click the "show unavailable videos" you'll still see them in the playlist. but now if you run the command again to "sync" the playlist, you will see that the index is shifted because it no longer takes into account the videos that got removed from youtube (but are still in the playlist). the flags in the provided example are probably not all necessary, but for reproduction purpose i provided the exact same command than my script uses. it's kind of an annoying issue to reproduce as you need a playlist that got videos that got removed from youtube before syncing it again. hoping it could help, and feel free to ask any questions.
deekerman 2026-02-21 12:53:01 -05:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@coletdjnz commented on GitHub (Apr 30, 2021):

Related: https://github.com/ytdl-org/youtube-dl/issues/28697

@coletdjnz commented on GitHub (Apr 30, 2021): Related: https://github.com/ytdl-org/youtube-dl/issues/28697
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#23607
No description provided.