model: Add rewrite_url() function. Bug 1905
This commit is contained in:
parent
d81d7617d3
commit
c576997c4a
|
@ -807,6 +807,17 @@ class PodcastChannel(PodcastModelObject):
|
|||
else:
|
||||
logger.warn('Cannot set strategy to %d', download_strategy)
|
||||
|
||||
def rewrite_url(self, new_url):
|
||||
new_url = util.normalize_feed_url(new_url)
|
||||
if new_url is None:
|
||||
return None
|
||||
|
||||
self.url = new_url
|
||||
self.http_etag = None
|
||||
self.http_last_modified = None
|
||||
self.save()
|
||||
return new_url
|
||||
|
||||
def check_download_folder(self):
|
||||
"""Check the download folder for externally-downloaded files
|
||||
|
||||
|
|
Loading…
Reference in New Issue