-
Notifications
You must be signed in to change notification settings - Fork 37
Added option to override file names (fix for brtmr/podfox#20) #21
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
base: master
Are you sure you want to change the base?
Conversation
take filename from content-disposition header if present
* Added option to override file names Some podcasts provide always the same filename, or meaningless file names. I added an option --rename-files to the episodes download function so that filenames are generated per episode using the schema: %Y-%m-%d_<title>.<ext> In addition, the title gets stripped of characters which would be illegal in some filesystems to prevent issues
* Added option to override file names Some podcasts provide always the same filename, or meaningless file names. I added an option --rename-files to the episodes download function so that filenames are generated per episode using the schema: %Y-%m-%d_<title>.<ext> In addition, the title gets stripped of characters which would be illegal in some filesystems to prevent issues
Bumps [requests](https://github.com/requests/requests) from 2.11.1 to 2.20.0. - [Release notes](https://github.com/requests/requests/releases) - [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md) - [Commits](psf/requests@v2.11.1...v2.20.0) Signed-off-by: dependabot[bot] <support@github.com>
Sorry, I have not updated this project in a while. merged.
Bump requests from 2.11.1 to 2.20.0, to make dependabot happy.
Add default configuration
|
Would love if this change could get merged into podfox. Podfox does exactly what I need, except for the odd podcast where each episode is named "stream.mp3". Thanks in advance for considering an update to the functionality of your utility! |
Added mimetype "audio/x-mpeg" and check for troubling or missing publishing date
Add ability to prune old episodes via prune command. Max age in days can be set via configuration or passed in via command line. This requires tracking of the filename used to store the podcast episode, so this has been added to the feed json. Pulling the filename out of the url can be used as a fallback; however, if the name has been pulled out of the HTTP headers, then this feature will not be backwards compatible for episodes named in this way and thus those will not be pruned.
|
This is a good PR. I've started using this in conjunction with the prune PR I made #43. This makes it very easy for those of us who have podcasts on our network being shared via samba, nfs, or upnp so we can easily see what episode it actually is. |
Python3.9 removes the `base64.encodingstring` and `base64.decodestring` after being deprecated in an earlier version. Update feedparser to a version that doesn't reference these functions so that we don't crash on python3.9.
|
Has this PR/project been abandoned? This PR from 2018 is just what I'm looking for for this weird subscription-based feed I have. |
Looks good to me!
Allow usage of later versions of feedparser
Update feedparser version for py39
requirements.txt
Outdated
| docopt==0.6.2 | ||
| feedparser==5.2.1 | ||
| requests==2.20.0 | ||
| tqdm=4.48.2 No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tqdm needs adding to the setup.py too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I merged the latest version from brtmr:master including this change, it should be good now!
Thanks a lot for your project, it is exactly what I was looking for!
Some podcasts provide always the same filename, or the file names are gibberish, see #20. I added a new option when downloading the episodes
(--rename-files) so that filenames are generated per episode using the schema:
%Y-%m-%d_<title>.
In addition, the title gets stripped of characters which would be illegal in some filesystems to prevent issues
It is probably not the most pytonic code but it seems to me to do its job, glad if I can give back to some users.