-
Notifications
You must be signed in to change notification settings - Fork 35
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
rename episodes #9
Comments
Just to clarify, are you wanting podfox to read ID3 tags to generate filenames? It's possible, just requires additional libraries and some additional code centered around checking to see if the tag exists first. |
I assume he is referring to the title tag in the feed. I have not implemented a feature to do this, because podcasts are inconsistent about this. |
It could be taken from the original RSS file too I guess. i'm not sure how On 4 Sep 2016 4:19 a.m., "tmajibon" [email protected] wrote:
|
Hi, |
yep, of course the manual way is not the preferred one :) Pavel
|
Hmm... Let me explain why I did not go down this route - Mostly to avoid naming collisions. To convert every possible title (which might contain lots punctuation & unusual characters) to a filename, you have to reduce them to a sensible charset - which introduces the possibility that titles only differ in some small sense, like adding a question mark. These would be mapped to the same filename on disk. I therefore prefer to have the filename the original author chose, which may or may not be named in a consistent way. I am gonna take some time later this week to properly implement a feature like this, which on a collision will either warn the user, or silently add a number to the end of the filename. |
Simple collision avoidance option: generate a timestamp, either from the time in the feed, or a datetime.now().isoformat()? |
You can simply add an episode number to the beginning of you human-readable-name, which has two advantages. thanks
|
what about something like this for getting the unique names? #!/usr/bin/python3 from os.path import expanduser url = 'http://www.bbc.co.uk/programmes/b00snr0w/episodes/downloads.rss' feed = feedparser.parse(url) thanks
|
Yeah, that bit is basically what I was thinking. Just add some code to bypass it if there is no "published" tag. Also needs to be code for conflicting published tags too. It's useful to recognize that the following is entirely possible:
You also can't use it by position in the feed because many places use rolling feeds (older things are removed from the feed). The simplest answer I can see is, the following in order:
|
Please add an option to rename episodes to real names (possibly shorten ones), then you could keep the filenames as links or symlinks.
I'm thinking of naming it as something like:
S01E03-real_name_of_the_episode.mp3
thanks
The text was updated successfully, but these errors were encountered: