Merge branch 'hotfix/0.12.14'

This commit is contained in:
JackDandy 2017-05-02 17:09:10 +01:00
commit a809ab9c06
7 changed files with 40 additions and 11 deletions

View file

@ -1,4 +1,9 @@
### 0.12.13 (2017-04-23 18:50:00 UTC)
### 0.12.14 (2017-05-02 17:10:00 UTC)
* Change provider Transmithe.net is now Nebulance
### 0.12.13 (2017-04-23 18:50:00 UTC)
* Change add filter for thetvdb show overview
* Change remove SpeedCD 'inspeed_uid' cookie requirement

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,011 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

View file

@ -59,7 +59,7 @@ CFG = None
CONFIG_FILE = None
# This is the version of the config we EXPECT to find
CONFIG_VERSION = 14
CONFIG_VERSION = 15
# Default encryption version (0 for None)
ENCRYPTION_VERSION = 0

View file

@ -448,7 +448,8 @@ class ConfigMigrator():
11: 'Migrate anime split view to new layout',
12: 'Add "hevc" and some non-english languages to ignore words if not found',
13: 'Change default dereferrer url to blank',
14: 'Convert Trakt to multi-account'}
14: 'Convert Trakt to multi-account',
15: 'Transmithe.net rebranded Nebulance'}
def migrate_config(self):
""" Calls each successive migration until the config is the same version as SG expects """
@ -783,3 +784,26 @@ class ConfigMigrator():
old_refresh_token = check_setting_str(self.config_obj, 'Trakt', 'trakt_refresh_token', '')
if old_token and old_refresh_token:
TraktAPI.add_account(old_token, old_refresh_token, None)
# Migration v15: Transmithe.net variables
def _migrate_v15(self):
try:
neb = filter(lambda p: 'Nebulance' in p.name, sickbeard.providers.sortedProviderList())[0]
except (StandardError, Exception):
return
# get the old settings from the file and store them in the new variable names
old_id = 'transmithe_net'
old_id_uc = old_id.upper()
neb.enabled = bool(check_setting_int(self.config_obj, old_id_uc, old_id, 0))
setattr(neb, 'username', check_setting_str(self.config_obj, old_id_uc, old_id + '_username', ''))
neb.password = check_setting_str(self.config_obj, old_id_uc, old_id + '_password', '')
neb.minseed = check_setting_int(self.config_obj, old_id_uc, old_id + '_minseed', 0)
neb.minleech = check_setting_int(self.config_obj, old_id_uc, old_id + '_minleech', 0)
neb.freeleech = bool(check_setting_int(self.config_obj, old_id_uc, old_id + '_freeleech', 0))
neb.enable_recentsearch = bool(check_setting_int(
self.config_obj, old_id_uc, old_id + '_enable_recentsearch', 1)) or not getattr(neb, 'supports_backlog')
neb.enable_backlog = bool(check_setting_int(self.config_obj, old_id_uc, old_id + '_enable_backlog', 1))
neb.search_mode = check_setting_str(self.config_obj, old_id_uc, old_id + '_search_mode', 'eponly')
neb.search_fallback = bool(check_setting_int(self.config_obj, old_id_uc, old_id + '_search_fallback', 0))
neb.seed_time = check_setting_int(self.config_obj, old_id_uc, old_id + '_seed_time', '')
neb._seed_ratio = check_setting_str(self.config_obj, old_id_uc, old_id + '_seed_ratio', '')

View file

@ -28,10 +28,10 @@ from . import newznab, omgwtfnzbs
# torrent
from . import alpharatio, beyondhd, bithdtv, bitmetv, btn, btscene, dh, extratorrent, \
fano, filelist, freshontv, funfile, gftracker, grabtheinfo, hd4free, hdbits, hdspace, hdtorrents, \
iptorrents, limetorrents, morethan, ncore, pisexy, pretome, privatehd, ptf, \
iptorrents, limetorrents, morethan, nebulance, ncore, pisexy, pretome, privatehd, ptf, \
rarbg, revtt, scc, scenetime, shazbat, speedcd, \
thepiratebay, torlock, torrentday, torrenting, torrentleech, \
torrentz2, transmithe_net, tvchaosuk, zooqle
torrentz2, tvchaosuk, zooqle
# anime
from . import anizb, nyaatorrents, tokyotoshokan
# custom
@ -64,6 +64,7 @@ __all__ = ['omgwtfnzbs',
'iptorrents',
'limetorrents',
'morethan',
'nebulance',
'ncore',
'pisexy',
'pretome',
@ -81,7 +82,6 @@ __all__ = ['omgwtfnzbs',
'torrenting',
'torrentleech',
'torrentz2',
'transmithe_net',
'tvchaosuk',
'zooqle',
'nyaatorrents',

View file

@ -25,12 +25,12 @@ from sickbeard.helpers import tryInt
from lib.unidecode import unidecode
class TransmithenetProvider(generic.TorrentProvider):
class NebulanceProvider(generic.TorrentProvider):
def __init__(self):
generic.TorrentProvider.__init__(self, 'Transmithe.net', cache_update_freq=17)
generic.TorrentProvider.__init__(self, 'Nebulance', cache_update_freq=17)
self.url_base = 'https://transmithe.net/'
self.url_base = 'https://nebulance.io/'
self.urls = {'config_provider_home_uri': self.url_base,
'login_action': self.url_base + 'login.php',
'user': self.url_base + 'ajax.php?action=index',
@ -46,7 +46,7 @@ class TransmithenetProvider(generic.TorrentProvider):
def _authorised(self, **kwargs):
if not super(TransmithenetProvider, self)._authorised(
if not super(NebulanceProvider, self)._authorised(
logged_in=(lambda y=None: self.has_all_cookies('session')),
post_params={'keeplogged': '1', 'form_tmpl': True}):
return False
@ -166,4 +166,4 @@ class TransmithenetProvider(generic.TorrentProvider):
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, **kwargs)
provider = TransmithenetProvider()
provider = NebulanceProvider()