mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 14:25:02 -05:00
Fix for migrating to new newznab and torrent provider config formats
This commit is contained in:
parent
ae5644ba91
commit
6fd19de7e2
@ -113,15 +113,15 @@ def makeNewznabProvider(configString):
|
|||||||
enable_backlog = 0
|
enable_backlog = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
name, url, key, catIDs, enabled, search_mode, search_fallback, enable_daily, enable_backlog = configString.split(
|
values = configString.split('|')
|
||||||
'|')
|
if len(values) == 9:
|
||||||
except ValueError:
|
name, url, key, catIDs, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values
|
||||||
try:
|
else:
|
||||||
name, url, key, catIDs, enabled, search_mode, search_fallback, enable_backlog = configString.split(
|
name = values[0]
|
||||||
'|')
|
url = values[1]
|
||||||
except ValueError:
|
key = values[2]
|
||||||
try:
|
catIDs = values[3]
|
||||||
name, url, key, catIDs, enabled = configString.split('|')
|
enabled = values[4]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logger.log(u"Skipping Newznab provider string: '" + configString + "', incorrect format", logger.ERROR)
|
logger.log(u"Skipping Newznab provider string: '" + configString + "', incorrect format", logger.ERROR)
|
||||||
return None
|
return None
|
||||||
@ -161,14 +161,13 @@ def makeTorrentRssProvider(configString):
|
|||||||
enable_backlog = 0
|
enable_backlog = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
name, url, cookies, enabled, search_mode, search_fallback, enable_daily, enable_backlog = configString.split(
|
values = configString.split('|')
|
||||||
'|')
|
if len(values) == 8:
|
||||||
except ValueError:
|
name, url, cookies, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values
|
||||||
try:
|
else:
|
||||||
name, url, enabled, search_mode, search_fallback, enable_daily, enable_backlog = configString.split('|')
|
name = values[0]
|
||||||
except ValueError:
|
url = values[1]
|
||||||
try:
|
enabled = values[3]
|
||||||
name, url, enabled = configString.split('|')
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logger.log(u"Skipping RSS Torrent provider string: '" + configString + "', incorrect format",
|
logger.log(u"Skipping RSS Torrent provider string: '" + configString + "', incorrect format",
|
||||||
logger.ERROR)
|
logger.ERROR)
|
||||||
|
Loading…
Reference in New Issue
Block a user