Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use variables in metadata (aka make up consecutive track numbers because the podcast's own are useless) #43
Some podcasts leave out track numbering or play fast and loose with it, occasionally inserting 'special' shows, that do not get a track number. This can be a problem for audio players.
A solution could be to allow the user to draw on variables for insertion into the metadata, specifically:
This raises two related question
If we want it in file names, variables is the best option. If not it might be best to contain it to a few select scenarios.
Consistent with the option to use regexes in filtering, the simplest and most helpful thing is to put strftime variables into the user's hands in metadata and filenaming.
This could be datetime stuff from the feed (if and only if it is universally available) or for the time of operation. Feed data makes the most sense but it is - possibly - unreliable. Check feedparser behaviour and occurence in the wild. One option is to go with feed data, fallback to current. The problem with that is if we add an old feed without date information, we get x entries with the same date which doesn't do much to distinguish or identify the entries.
In addition to this we add our own variable ($consecutive_number?) that is saved into jar and incremented once for each succesfully added entry. This is either added by the user as a TRCK override or by a separate option.
Finally, reusing the title (<title>my_title</title>) as a variable in metadata or renaming would allow for some easy streamlining - and some useful global setting (e.g. if filename is set to $title-%Y%m%d)
On a side note: About half my subscriptions have track numbering. No current episodes have 'aberrant' track numbers. Either the feed has track numbers or it doesn't. Old episodes of 'Judge John Hodgman' display some variation: Using '118' '117/117' and '119/' within three weeks is an impressive display of indecision.
Or maybe just go simple on this one. Tow options: Do we use it? If so what style do we use?
We need only_if_missing to use as a default setting. We will have to base it off of a single file which is kinda shaky.
Consecutive is simply start at 001 and go from there.
Even more simplified: We stick with the
Numbering from '1' may seem a bit odd if we know that the feed is at episode 234 and may even say so in the filename but a) it will be universally recognised by players (especially if we zero pad it) and b) it will allow us to focus on it and do it properly. KISS.