diff --git a/CHANGES.md b/CHANGES.md index 081d6f9a..31f443ec 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,11 @@ [develop changelog] +### 0.6.2 (2015-01-21 23:35:00 UTC) + +* Fix invalid addition of trailing slash to custom torrent RSS URLs + + ### 0.6.1 (2015-01-20 14:00:00 UTC) * Fix snatching from TorrentBytes provider diff --git a/sickbeard/config.py b/sickbeard/config.py index 9e30f573..a50dc5b0 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -313,7 +313,7 @@ def clean_hosts(hosts, default_port=None): return cleaned_hosts -def clean_url(url): +def clean_url(url, add_slash=True): """ Returns an cleaned url starting with a scheme and folder with trailing / or an empty string @@ -330,7 +330,7 @@ def clean_url(url): if not path.endswith('/'): basename, ext = ek.ek(os.path.splitext, ek.ek(os.path.basename, path)) # @UnusedVariable - if not ext: + if not ext and add_slash: path = path + '/' cleaned_url = urlparse.urlunsplit((scheme, netloc, path, query, fragment)) @@ -744,4 +744,4 @@ class ConfigMigrator(): def _migrate_v8(self): # removing settings from gui and making it a hidden debug option sickbeard.RECENTSEARCH_STARTUP = False - sickbeard.BACKLOG_STARTUP = False \ No newline at end of file + sickbeard.BACKLOG_STARTUP = False diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 865d496b..7a53119c 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2118,7 +2118,7 @@ class ConfigProviders(MainHandler): continue curName, curURL, curCookies = curTorrentRssProviderStr.split('|') - curURL = config.clean_url(curURL) + curURL = config.clean_url(curURL, False) newProvider = rsstorrent.TorrentRssProvider(curName, curURL, curCookies)