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

ability to use number of video in playlist in file format string #570

Closed
sorokin opened this issue Dec 1, 2012 · 4 comments
Closed

ability to use number of video in playlist in file format string #570

sorokin opened this issue Dec 1, 2012 · 4 comments

Comments

@sorokin
Copy link

@sorokin sorokin commented Dec 1, 2012

Currently it is not possible to use number of video in playlist in format string. autonumber doesn't work because it starts from 1 even when --playlist-start is not 1.

Here is branch https://github.com/sorokin/youtube-dl/tree/playlist-number that implements this feature.

@phihag
Copy link
Contributor

@phihag phihag commented Dec 4, 2012

In the future, please submit issues with code as a pull request. That makes it far easier to comment and eventually merge the code. Thanks!

Your code makes a lot of changes to unrelated methods. It also breaks on Python 3 because unicode (instead of compat_str) is being used.

However, while I'm positive towards the feature, it should be the responsibility of the playlist IE to provide playlist indexes, shouldn't it? Precisely because they can do weird stuff with --playlist-start and friends.

@sorokin
Copy link
Author

@sorokin sorokin commented Dec 8, 2012

I haven't submitted my issue as pull request because I was sure that my commit wasn't good enough to include it in your master branch. It is just a random hack that works for me.

Maybe later I will create pretty patch to implement this feature, but now consider this issue just as feature request.

@CraigMarkwardt
Copy link
Contributor

@CraigMarkwardt CraigMarkwardt commented Mar 8, 2013

I just submitted a pull request which adds a sequence index, and allows -o %(seq_index)s in the output format.
#731

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 19, 2013

Fixed in dce9027, use %(playlist_index)s in the output template.

@jaimeMF jaimeMF closed this Apr 19, 2013
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
4 participants
You can’t perform that action at this time.