mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Merge pull request #496 from JackDandy/feature/FixSavingTorrentRatio
Fix saving torrent provider option "Seed until ratio" after recent re…
This commit is contained in:
commit
c534b1e3b6
3 changed files with 22 additions and 21 deletions
|
@ -25,6 +25,7 @@
|
||||||
* Update change to suppress reporting of Tornado exception error 1 to updated package (ref:hacks.txt)
|
* Update change to suppress reporting of Tornado exception error 1 to updated package (ref:hacks.txt)
|
||||||
* Update fix for API response header for JSON content type and the return of JSONP data to updated package (ref:hacks.txt)
|
* Update fix for API response header for JSON content type and the return of JSONP data to updated package (ref:hacks.txt)
|
||||||
* Fix post processing season pack folders
|
* Fix post processing season pack folders
|
||||||
|
* Fix saving torrent provider option "Seed until ratio" after recent refactor
|
||||||
|
|
||||||
|
|
||||||
### 0.10.0 (2015-08-06 11:05:00 UTC)
|
### 0.10.0 (2015-08-06 11:05:00 UTC)
|
||||||
|
|
|
@ -1034,23 +1034,23 @@ def initialize(consoleLogging=True):
|
||||||
torrent_prov.confirmed = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_confirmed', 0))
|
torrent_prov.confirmed = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_confirmed', 0))
|
||||||
if hasattr(torrent_prov, 'options'):
|
if hasattr(torrent_prov, 'options'):
|
||||||
torrent_prov.options = check_setting_str(CFG, prov_id_uc, prov_id + '_options', '')
|
torrent_prov.options = check_setting_str(CFG, prov_id_uc, prov_id + '_options', '')
|
||||||
if hasattr(torrent_prov, 'ratio'):
|
if hasattr(torrent_prov, '_seed_ratio'):
|
||||||
torrent_prov.ratio = check_setting_str(CFG, prov_id_uc, prov_id + '_ratio', '')
|
torrent_prov._seed_ratio = check_setting_str(CFG, prov_id_uc, prov_id + '_seed_ratio', '')
|
||||||
if hasattr(torrent_prov, 'minseed'):
|
if hasattr(torrent_prov, 'minseed'):
|
||||||
torrent_prov.minseed = check_setting_int(CFG, prov_id_uc, prov_id + '_minseed', 0)
|
torrent_prov.minseed = check_setting_int(CFG, prov_id_uc, prov_id + '_minseed', 0)
|
||||||
if hasattr(torrent_prov, 'minleech'):
|
if hasattr(torrent_prov, 'minleech'):
|
||||||
torrent_prov.minleech = check_setting_int(CFG, prov_id_uc, prov_id + '_minleech', 0)
|
torrent_prov.minleech = check_setting_int(CFG, prov_id_uc, prov_id + '_minleech', 0)
|
||||||
if hasattr(torrent_prov, 'freeleech'):
|
if hasattr(torrent_prov, 'freeleech'):
|
||||||
torrent_prov.freeleech = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_freeleech', 0))
|
torrent_prov.freeleech = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_freeleech', 0))
|
||||||
if hasattr(torrent_prov, 'search_mode'):
|
|
||||||
torrent_prov.search_mode = check_setting_str(CFG, prov_id_uc, prov_id + '_search_mode', 'eponly')
|
|
||||||
if hasattr(torrent_prov, 'search_fallback'):
|
|
||||||
torrent_prov.search_fallback = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_search_fallback', 0))
|
|
||||||
if hasattr(torrent_prov, 'enable_recentsearch'):
|
if hasattr(torrent_prov, 'enable_recentsearch'):
|
||||||
torrent_prov.enable_recentsearch = bool(check_setting_int(CFG, prov_id_uc,
|
torrent_prov.enable_recentsearch = bool(check_setting_int(CFG, prov_id_uc,
|
||||||
prov_id + '_enable_recentsearch', 1))
|
prov_id + '_enable_recentsearch', 1))
|
||||||
if hasattr(torrent_prov, 'enable_backlog'):
|
if hasattr(torrent_prov, 'enable_backlog'):
|
||||||
torrent_prov.enable_backlog = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_enable_backlog', 1))
|
torrent_prov.enable_backlog = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_enable_backlog', 1))
|
||||||
|
if hasattr(torrent_prov, 'search_mode'):
|
||||||
|
torrent_prov.search_mode = check_setting_str(CFG, prov_id_uc, prov_id + '_search_mode', 'eponly')
|
||||||
|
if hasattr(torrent_prov, 'search_fallback'):
|
||||||
|
torrent_prov.search_fallback = bool(check_setting_int(CFG, prov_id_uc, prov_id + '_search_fallback', 0))
|
||||||
|
|
||||||
for nzb_prov in [curProvider for curProvider in providers.sortedProviderList()
|
for nzb_prov in [curProvider for curProvider in providers.sortedProviderList()
|
||||||
if GenericProvider.NZB == curProvider.providerType]:
|
if GenericProvider.NZB == curProvider.providerType]:
|
||||||
|
@ -1519,28 +1519,28 @@ def save_config():
|
||||||
new_config[prov_id_uc][prov_id + '_passkey'] = torrent_prov.passkey
|
new_config[prov_id_uc][prov_id + '_passkey'] = torrent_prov.passkey
|
||||||
if hasattr(torrent_prov, 'confirmed'):
|
if hasattr(torrent_prov, 'confirmed'):
|
||||||
new_config[prov_id_uc][prov_id + '_confirmed'] = int(torrent_prov.confirmed)
|
new_config[prov_id_uc][prov_id + '_confirmed'] = int(torrent_prov.confirmed)
|
||||||
if hasattr(torrent_prov, 'ratio'):
|
if hasattr(torrent_prov, '_seed_ratio'):
|
||||||
new_config[prov_id_uc][prov_id + '_ratio'] = torrent_prov.ratio
|
new_config[prov_id_uc][prov_id + '_seed_ratio'] = torrent_prov.seed_ratio()
|
||||||
if hasattr(torrent_prov, 'minseed'):
|
if hasattr(torrent_prov, 'minseed'):
|
||||||
new_config[prov_id_uc][prov_id + '_minseed'] = int(torrent_prov.minseed)
|
new_config[prov_id_uc][prov_id + '_minseed'] = int(torrent_prov.minseed)
|
||||||
if hasattr(torrent_prov, 'minleech'):
|
if hasattr(torrent_prov, 'minleech'):
|
||||||
new_config[prov_id_uc][prov_id + '_minleech'] = int(torrent_prov.minleech)
|
new_config[prov_id_uc][prov_id + '_minleech'] = int(torrent_prov.minleech)
|
||||||
|
if hasattr(torrent_prov, 'freeleech'):
|
||||||
|
new_config[prov_id_uc][prov_id + '_freeleech'] = int(torrent_prov.freeleech)
|
||||||
|
if hasattr(torrent_prov, 'enable_recentsearch'):
|
||||||
|
new_config[prov_id_uc][prov_id + '_enable_recentsearch'] = int(torrent_prov.enable_recentsearch)
|
||||||
|
if hasattr(torrent_prov, 'enable_backlog'):
|
||||||
|
new_config[prov_id_uc][prov_id + '_enable_backlog'] = int(torrent_prov.enable_backlog)
|
||||||
|
if hasattr(torrent_prov, 'search_mode'):
|
||||||
|
new_config[prov_id_uc][prov_id + '_search_mode'] = torrent_prov.search_mode
|
||||||
|
if hasattr(torrent_prov, 'search_fallback'):
|
||||||
|
new_config[prov_id_uc][prov_id + '_search_fallback'] = int(torrent_prov.search_fallback)
|
||||||
if hasattr(torrent_prov, 'options'):
|
if hasattr(torrent_prov, 'options'):
|
||||||
new_config[prov_id_uc][prov_id + '_options'] = torrent_prov.options
|
new_config[prov_id_uc][prov_id + '_options'] = torrent_prov.options
|
||||||
if hasattr(torrent_prov, 'proxy'):
|
if hasattr(torrent_prov, 'proxy'):
|
||||||
new_config[prov_id_uc][prov_id + '_proxy'] = int(torrent_prov.proxy.enabled)
|
new_config[prov_id_uc][prov_id + '_proxy'] = int(torrent_prov.proxy.enabled)
|
||||||
if hasattr(torrent_prov.proxy, 'url'):
|
if hasattr(torrent_prov.proxy, 'url'):
|
||||||
new_config[prov_id_uc][prov_id + '_proxy_url'] = torrent_prov.proxy.url
|
new_config[prov_id_uc][prov_id + '_proxy_url'] = torrent_prov.proxy.url
|
||||||
if hasattr(torrent_prov, 'freeleech'):
|
|
||||||
new_config[prov_id_uc][prov_id + '_freeleech'] = int(torrent_prov.freeleech)
|
|
||||||
if hasattr(torrent_prov, 'search_mode'):
|
|
||||||
new_config[prov_id_uc][prov_id + '_search_mode'] = torrent_prov.search_mode
|
|
||||||
if hasattr(torrent_prov, 'search_fallback'):
|
|
||||||
new_config[prov_id_uc][prov_id + '_search_fallback'] = int(torrent_prov.search_fallback)
|
|
||||||
if hasattr(torrent_prov, 'enable_recentsearch'):
|
|
||||||
new_config[prov_id_uc][prov_id + '_enable_recentsearch'] = int(torrent_prov.enable_recentsearch)
|
|
||||||
if hasattr(torrent_prov, 'enable_backlog'):
|
|
||||||
new_config[prov_id_uc][prov_id + '_enable_backlog'] = int(torrent_prov.enable_backlog)
|
|
||||||
|
|
||||||
for nzb_prov in [curProvider for curProvider in providers.sortedProviderList()
|
for nzb_prov in [curProvider for curProvider in providers.sortedProviderList()
|
||||||
if GenericProvider.NZB == curProvider.providerType]:
|
if GenericProvider.NZB == curProvider.providerType]:
|
||||||
|
|
|
@ -4155,11 +4155,11 @@ class ConfigProviders(Config):
|
||||||
except:
|
except:
|
||||||
curTorrentProvider.minleech = 0
|
curTorrentProvider.minleech = 0
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'ratio'):
|
if hasattr(curTorrentProvider, '_seed_ratio'):
|
||||||
try:
|
try:
|
||||||
curTorrentProvider.ratio = str(kwargs[curTorrentProvider.get_id() + '_ratio']).strip()
|
curTorrentProvider._seed_ratio = str(kwargs[curTorrentProvider.get_id() + '_ratio']).strip()
|
||||||
except:
|
except:
|
||||||
curTorrentProvider.ratio = None
|
curTorrentProvider._seed_ratio = None
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'digest'):
|
if hasattr(curTorrentProvider, 'digest'):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue