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

Include airing date in Episode title #21

Open
BumbleCast opened this issue Aug 26, 2022 · 1 comment
Open

Include airing date in Episode title #21

BumbleCast opened this issue Aug 26, 2022 · 1 comment

Comments

@BumbleCast
Copy link

BumbleCast commented Aug 26, 2022

Hi,
first of all, thanks for the amazing script.
Would it be possible to include the airing/release date in the filename?

e.g.
Year-Month-Day - Name of podcast - title of episode

Would help alot to organize files.

edit:
I looked at the code, and it could be done by changing the podcast file

and add in def get_episode_info(episode_id_hex):
date_temp = datetime.strptime(release_date, '%Y-%m-%dT%H:%M:%SZ')
release_date_clean = f'{date_temp.strftime("%Y")}-{date_temp.strftime("%m")}-{date_temp.strftime("%d")}'
return podcast_name, podcast_id, duration_ms, episode_name, description, release_date, uri, external_url, release_date_clean

and in def download_episode(episode_id) -> None:
filename = clean_filename(release_date_clean + ' - ' + podcast_name + ' - ' + episode_name)

(sorry, I am relatively new to github)

@jankkm
Copy link
Contributor

jankkm commented Sep 5, 2022

This makes sense because there is a popular German podcast which doesn't have unique episode titles.

Your fix does work except you forgot to assign the additional return value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants