return filename in episode.local_filename(return_wanted_filename=True)

when episode has a filename. It used to return the full path.
see #555
This commit is contained in:
Eric Le Lay 2018-11-13 21:43:19 +01:00
parent b47ad8b636
commit 6433f5f10b
1 changed files with 3 additions and 0 deletions

View File

@ -498,6 +498,9 @@ class PodcastEpisode(PodcastModelObject):
self.download_filename = wanted_filename
self.save()
if return_wanted_filename:
# return the filename, not full path
return self.download_filename
return os.path.join(self.channel.save_dir, self.download_filename)
def extension(self, may_call_local_filename=True):