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

Request: upload_year tag in output template #7293

Open
gappleto97 opened this issue Oct 25, 2015 · 5 comments
Open

Request: upload_year tag in output template #7293

gappleto97 opened this issue Oct 25, 2015 · 5 comments
Labels

Comments

@gappleto97
Copy link

@gappleto97 gappleto97 commented Oct 25, 2015

I'm trying to folder my videos by year. It would be very useful if I could do this natively, rather than managing it from my script.

This could be fixed by copying the relevant code for the upload_date tag, and returning the first four characters.

This would result in %(upload_year)s returning year in YYYY format.

@jaimeMF jaimeMF added the request label Oct 25, 2015
@gappleto97
Copy link
Author

@gappleto97 gappleto97 commented Oct 25, 2015

If someone can direct me to the appropriate areas/methods, I'll make a pull request for it. I can't seem to find where the template processing is done.

@amper5and
Copy link

@amper5and amper5and commented Jun 30, 2017

rather late answer, but maybe someone will be helped.

An easy way to display just the first # of characters is by setting the precision component in the string formatting like so:

%(upload_date).#s where # would specify the number of characters to use. Since upload_date has YYYYMMDD format, use %(upload_date).4s to get just the year YYYY.

ps: Now it would be great if someone knows how to use YYMMDD format, since there are no YT videos before the year 2000. I can't figure out how to strip the first 2 characters.

@DeftNerd
Copy link

@DeftNerd DeftNerd commented Dec 9, 2018

Honestly, %(upload_year)s, %(upload_month)s, and %(upload_day)s would all be welcome so it's easy to generate a filename like
ChannelName - 2018-04-15 - Video Title.mp4 which is a standard that many media organizers expect and parse easily.

@fireattack
Copy link

@fireattack fireattack commented Aug 15, 2019

Agreed. I'd like to use YYMMDD too.

@RandomNinjaAtk
Copy link

@RandomNinjaAtk RandomNinjaAtk commented Sep 13, 2019

Honestly, %(upload_year)s, %(upload_month)s, and %(upload_day)s would all be welcome so it's easy to generate a filename like
ChannelName - 2018-04-15 - Video Title.mp4 which is a standard that many media organizers expect and parse easily.

+1, this would be super helpful...

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
6 participants
You can’t perform that action at this time.