Skip to content

Commit

Permalink
model: Add rewrite_url() function. Bug 1905
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Apr 1, 2014
1 parent d81d761 commit c576997
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gpodder/model.py
Expand Up @@ -807,6 +807,17 @@ def set_download_strategy(self, download_strategy):
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
Expand Down

0 comments on commit c576997

Please sign in to comment.