aajanki / yle-dl

Download videos from Yle servers
https://aajanki.github.io/yle-dl/index-en.html
GNU General Public License v3.0
302 stars 52 forks source link

Add season and episode_or_date template substitutions #349

Closed kankaristo closed 7 months ago

kankaristo commented 8 months ago

Added 2 new template substitutions:

kankaristo commented 8 months ago

About "Season 01" vs "S01": the format "Season 01" is the most common for directory names (at least as far as I've seen), and e.g. Jellyfin requires that directory naming structure (with no way to configure it that I'm aware of).

And even "S01" isn't really "language-neutral". :P In Finnish it should really be "K01" (which is what Yle Areena uses, although without the zero-padding).

I could add some way to configure the prefix? The default could be "S", or maybe an empty string, so that you could get a "plain" season number with ${season}.

Any thoughts on how the configuration should be done (or if it's even a good idea)?

Or instead of configuring the prefix, it could be a template like Season {}, where the season number would be inserted. But then you have templates within templates, and if {} is missing, that's an error, etc., so maybe a simple prefix is better.


The other things sound like good changes, I'll work on those soon (probably next weekend).

aajanki commented 8 months ago

After thinking a bit more, let's just keep it as "Season 01" after all. All the other options would increase the complexity too much to justify it.

kankaristo commented 8 months ago

Made the changes discussed above. Now ${season}/xyz works identically to the earlier ${season_dir}xyz. Also rebased from master.