Only output info about file downloads in verbose mode
This commit is contained in:
parent
f9c98402bc
commit
005244e96d
2 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,7 @@ def replaceExtension(fileName, newExtension):
|
|||
parts.pop()
|
||||
return '.'.join(parts) + '.' + newExtension
|
||||
|
||||
def saveEpisode(podcast, episode):
|
||||
def saveEpisode(podcast, episode, options):
|
||||
match = startingNumerals.match(episode['title'])
|
||||
if episode['episode']:
|
||||
# Episode (& possibly season) number encoded in the RSS
|
||||
|
@ -69,9 +69,10 @@ def saveEpisode(podcast, episode):
|
|||
episodeName += ' - ' + episode['subtitle']
|
||||
episodeRef = getRef(episodeName)
|
||||
fileName = f"{episodeRef}.{ext}"
|
||||
print(f"Downloading episode {identifier} of {podcast['name']} as {fileName}")
|
||||
if options.verbose:
|
||||
print(f"Downloading episode {identifier} of {podcast['name']} as {fileName}")
|
||||
fetcher.download(episode['url'], f"{podcast['dir']}/{fileName}")
|
||||
else:
|
||||
elif options.verbose:
|
||||
print(f"Episode {identifier} of {podcast['name']} has been downloaded previously; skipping")
|
||||
|
||||
def findAudio():
|
||||
|
|
2
process
2
process
|
@ -16,7 +16,7 @@ for podcast in config['podcasts']:
|
|||
if options.downloadEpisodes:
|
||||
eps = rss.getEpisodes(podcast, options.episodes, options.numEpisodes)
|
||||
for ep in eps:
|
||||
files.saveEpisode(podcast, ep)
|
||||
files.saveEpisode(podcast, ep, options)
|
||||
|
||||
if not options.generate:
|
||||
exit(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue