1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-23 16:22:45 +00:00

FIX: Provider Priority Error on very first run

This commit is contained in:
evilhero 2013-10-24 22:14:31 -04:00
parent 527c23526e
commit 17866be3a1
2 changed files with 7 additions and 6 deletions

View file

@ -917,10 +917,13 @@ def config_write():
new_config['General']['rss_lastrun'] = RSS_LASTRUN
# Need to unpack the extra newznabs for saving in config.ini
flattened_providers = []
for prov_order in PROVIDER_ORDER:
for item in prov_order:
flattened_providers.append(item)
if PROVIDER_ORDER is None:
flattened_providers = None
else:
flattened_providers = []
for prov_order in PROVIDER_ORDER:
for item in prov_order:
flattened_providers.append(item)
new_config['General']['provider_order'] = flattened_providers

View file

@ -83,10 +83,8 @@ def torrents(pickfeed=None,seriesname=None,issue=None):
if pickfeed == "1": # cbt rss feed based on followlist
feed = "http://comicbt.com/rss.php?action=browse&passkey=" + str(passkey) + "&type=dl"
elif pickfeed == "2" and srchterm is not None: # kat.ph search
logger.info('PF2 - kat url set to: ' + kat_url)
feed = kat_url + "usearch/" + str(srchterm) + "%20category%3Acomics%20seeds%3A1/?rss=1"
elif pickfeed == "3": # kat.ph rss feed
logger.info('PF3 - kat url set to: ' + kat_url)
feed = kat_url + "usearch/category%3Acomics%20seeds%3A1/?rss=1"
elif pickfeed == "4": #cbt follow link
feed = "http://comicbt.com/rss.php?action=follow&passkey=" + str(passkey) + "&type=dl"