Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A small correction to the docs #26194

Closed
lkintact opened this issue Jul 30, 2020 · 6 comments
Closed

A small correction to the docs #26194

lkintact opened this issue Jul 30, 2020 · 6 comments
Labels

Comments

@lkintact
Copy link

@lkintact lkintact commented Jul 30, 2020

  • I've verified that I'm running youtube-dl version 2020.07.28

At https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template the template name playlist_index is said to be "padded with leading zeros according to the total length of the playlist". This doesn't happen however (perhaps was the case in the past, then changed and not reflected in the documentation?)

To check execute
youtube-dl --get-filename -o "[index %(playlist_index)d] %(title)s.%(ext)s" "https://www.youtube.com/watch?v=a0ul-BghOAs&list=OLAK5uy_kC4d8eCdL3QzEXEAoF97MMxJLP3f6M0n0", notice the indexes 1-9 aren't padded with zeroes.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jul 31, 2020

youtube-dl --get-filename -o "[index %(playlist_index)s] %(title)s.%(ext)s" "https://www.youtube.com/watch?v=a0ul-BghOAs&list=OLAK5uy_kC4d8eCdL3QzEXEAoF97MMxJLP3f6M0n0"
[index 01] Phantogram 'Nothing But Trouble' [Official Audio].mp4
[index 02] Phantogram - Black Out Days (Official Music Video).mp4
[index 03] Phantogram - Fall In Love (Official Music Video).mp4
[index 04] Never Going Home.mp4
[index 05] The Day You Died.mp4
[index 06] Howling At The Moon.mp4
[index 07] Bad Dreams.mp4
[index 08] Phantogram 'Bill Murray' [Official Audio].mp4
[index 09] I Don’t Blame You.mp4
[index 10] Celebrating Nothing.mp4
[index 11] My Only Friend.mp4
@remitamine remitamine closed this Jul 31, 2020
@remitamine remitamine added the invalid label Jul 31, 2020
@lkintact
Copy link
Author

@lkintact lkintact commented Jul 31, 2020

@remitamine Sorry I didn't paste the verbose log. This is how it looks for me:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--get-filename', '-o', '[index %(playlist_index)d] %(title)s.%(ext)s', 'https://www.youtube.com/watch?v=a0ul-BghOAs&list=OLAK5uy_kC4d8eCdL3QzEXEAoF97MMxJLP3f6M0n0']
[debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best
[index 1] Phantogram 'Nothing But Trouble' [Official Audio].webm
[debug] Default format spec: bestvideo+bestaudio/best
[index 2] Phantogram - Black Out Days (Official Music Video).mp4
[debug] Default format spec: bestvideo+bestaudio/best
[index 3] Phantogram - Fall In Love (Official Music Video).mp4
[debug] Default format spec: bestvideo+bestaudio/best
[index 4] Never Going Home.mp4
[debug] Default format spec: bestvideo+bestaudio/best
[index 5] The Day You Died.webm
[debug] Default format spec: bestvideo+bestaudio/best
[index 6] Howling At The Moon.mp4
[debug] Default format spec: bestvideo+bestaudio/best
[index 7] Bad Dreams.mp4
[debug] Default format spec: bestvideo+bestaudio/best
[index 8] Phantogram 'Bill Murray' [Official Audio].webm
[debug] Default format spec: bestvideo+bestaudio/best
[index 9] I Don’t Blame You.webm
[debug] Default format spec: bestvideo+bestaudio/best
[index 10] Celebrating Nothing.webm
[debug] Default format spec: bestvideo+bestaudio/best
[index 11] My Only Friend.webm
@s104346
Copy link

@s104346 s104346 commented Jul 31, 2020

@lkintact use %(playlist_index)s instead of %(playlist_index)d

@lkintact
Copy link
Author

@lkintact lkintact commented Jul 31, 2020

@s104346 Thank you, with s it worked as described.

I think it's "playlist_index (numeric)" in the documentation that confused me. Maybe since "playlist_index" only works as described if formatted as a string, it should listed as "playlist_index (string)"?

@lkintact
Copy link
Author

@lkintact lkintact commented Aug 3, 2020

@remitamine What do you think about the suggestion in my post above?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Aug 5, 2020

no, the data type of the value is an integer/numeric not a string. all the examples already use the syntax that I showed you here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.