mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-06 01:53:37 +00:00
commit
8896cfe970
10 changed files with 58 additions and 41 deletions
|
@ -1,4 +1,10 @@
|
|||
### 0.15.12 (2018-04-17 14:10:00 UTC)
|
||||
### 0.15.13 (2018-04-18 13:50:00 UTC)
|
||||
|
||||
* Fix API endpoints for sg.exceptions and exceptions
|
||||
* Change improve searching torrent provider BTScene
|
||||
|
||||
|
||||
### 0.15.12 (2018-04-17 14:10:00 UTC)
|
||||
|
||||
* Fix ETTV torrent provider
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
<ol>
|
||||
<li>Install the SickGear repo to access its Kodi Add-on
|
||||
<ul>
|
||||
<li>in <b class="boldest">Filemanager</b>, add a source for SickGear with <span class="grey-text"><ip>:<port>/kodi/</span> (e.g. <span class="grey-text">192.168.0.10:$sg_port/kodi/</span>)<br>
|
||||
<li>in <b class="boldest">Filemanager</b>, add a source with <span class="grey-text"><ip>:<port>/kodi/</span> (e.g. <span class="grey-text">http://192.168.0.10:$sg_port/kodi/</span>)<br>
|
||||
and name it for example, <span class="grey-text">SickGear</span>. <em>You will need to allow <span class="highlight-text">Unknown Sources</span> if not already</em> </li>
|
||||
<li>in <b class="boldest">System/Add-ons</b>, "<span class="grey-text">Install from zip file</span>", in the folder list, select the <span class="grey-text">SickGear</span> source</li>
|
||||
<li>select the <span class="grey-text">repository.sickgear</span> in the folder listing, and install the repository zip<br>
|
||||
|
|
|
@ -103,7 +103,10 @@ class EmbyNotifier(Notifier):
|
|||
except (StandardError, Exception):
|
||||
pass
|
||||
if not sock_issue:
|
||||
cs.shutdown(SHUT_RDWR)
|
||||
try:
|
||||
cs.shutdown(SHUT_RDWR)
|
||||
except (StandardError, Exception):
|
||||
pass
|
||||
return result
|
||||
|
||||
def _check_config(self, hosts=None, apikeys=None):
|
||||
|
|
|
@ -65,7 +65,7 @@ class BTSceneProvider(generic.TorrentProvider):
|
|||
'mPblqN2ctQnY', 'vlWduM2 YPtU', 'nYoRXahZPm L', '15PSZuV2 YzR', 'WYrN 2PbsJmb',
|
||||
'==wZ y9mL sx']],
|
||||
]]]
|
||||
self.url_vars = {'search': '?q=%s&category=series&order=1', 'browse': 'lastdaycat/type/Series/',
|
||||
self.url_vars = {'search': '?q=%s&order=1', 'browse': 'lastdaycat/type/Series/',
|
||||
'get': 'torrentdownload.php?id=%s'}
|
||||
self.url_tmpl = {'config_provider_home_uri': '%(home)s', 'search': '%(vars)s',
|
||||
'browse': '%(home)s%(vars)s', 'get': '%(home)s%(vars)s'}
|
||||
|
@ -165,5 +165,19 @@ class BTSceneProvider(generic.TorrentProvider):
|
|||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
return super(BTSceneProvider, self)._episode_strings(ep_obj, sep_date='.', **kwargs)
|
||||
|
||||
def get_data(self, url):
|
||||
result = None
|
||||
resp = self.get_url(url, timeout=90)
|
||||
if self.should_skip():
|
||||
return result
|
||||
|
||||
try:
|
||||
result = resp
|
||||
if re.search('(?i)\s+html', resp[0:30]):
|
||||
result = re.findall('(?i)"(magnet:[^"]+?)"', resp)[0]
|
||||
except IndexError:
|
||||
pass
|
||||
return result
|
||||
|
||||
|
||||
provider = BTSceneProvider()
|
||||
|
|
|
@ -134,19 +134,10 @@ class ETTVProvider(generic.TorrentProvider):
|
|||
return result
|
||||
|
||||
try:
|
||||
result = re.findall('(?i)"(magnet:[^"]+?)">', html)[0]
|
||||
result = re.findall('(?i)"(magnet:[^"]+?)"', html)[0]
|
||||
except IndexError:
|
||||
logger.log('Failed no magnet in response', logger.DEBUG)
|
||||
return result
|
||||
|
||||
def get_result(self, episodes, url):
|
||||
result = None
|
||||
|
||||
if url:
|
||||
result = super(ETTVProvider, self).get_result(episodes, url)
|
||||
result.get_data_func = self.get_data
|
||||
|
||||
return result
|
||||
|
||||
|
||||
provider = ETTVProvider()
|
||||
|
|
|
@ -668,7 +668,7 @@ class GenericProvider(object):
|
|||
cache_file = ek.ek(os.path.join, cache_dir, base_name)
|
||||
|
||||
self.session.headers['Referer'] = url
|
||||
if cached or helpers.download_file(url, cache_file, session=self.session):
|
||||
if cached or helpers.download_file(url, cache_file, session=self.session, allow_redirects='/it' not in url):
|
||||
|
||||
if self._verify_download(cache_file):
|
||||
logger.log(u'Downloaded %s result from %s' % (self.name, url))
|
||||
|
@ -1675,3 +1675,13 @@ class TorrentProvider(GenericProvider):
|
|||
self.ping_skip = ((60*60)/self.ping_freq, None)[self._authorised()]
|
||||
|
||||
self._sleep_with_stop(self.ping_freq)
|
||||
|
||||
def get_result(self, episodes, url):
|
||||
result = None
|
||||
|
||||
if url:
|
||||
result = super(TorrentProvider, self).get_result(episodes, url)
|
||||
if hasattr(self, 'get_data'):
|
||||
result.get_data_func = self.get_data
|
||||
|
||||
return result
|
||||
|
|
|
@ -121,14 +121,5 @@ class PiSexyProvider(generic.TorrentProvider):
|
|||
logger.log('Failed no torrent in response', logger.DEBUG)
|
||||
return result
|
||||
|
||||
def get_result(self, episodes, url):
|
||||
result = None
|
||||
|
||||
if url:
|
||||
result = super(PiSexyProvider, self).get_result(episodes, url)
|
||||
result.get_data_func = self.get_data
|
||||
|
||||
return result
|
||||
|
||||
|
||||
provider = PiSexyProvider()
|
||||
|
|
|
@ -146,15 +146,6 @@ class PotUKProvider(generic.TorrentProvider):
|
|||
logger.log('Failed no torrent in response', logger.DEBUG)
|
||||
return result
|
||||
|
||||
def get_result(self, episodes, url):
|
||||
result = None
|
||||
|
||||
if url:
|
||||
result = super(PotUKProvider, self).get_result(episodes, url)
|
||||
result.get_data_func = self.get_data
|
||||
|
||||
return result
|
||||
|
||||
def ui_string(self, key):
|
||||
return ('%s_digest' % self.get_id()) == key and 'use... \'bbuserid=xx; bbpassword=yy\'' or ''
|
||||
|
||||
|
|
|
@ -1409,14 +1409,22 @@ class CMD_SickGearExceptions(ApiCall):
|
|||
""" display scene exceptions for all or a given show """
|
||||
myDB = db.DBConnection(row_type="dict")
|
||||
|
||||
if self.indexerid == None:
|
||||
sqlResults = myDB.select("SELECT show_name, indexer_id AS 'indexerid' FROM scene_exceptions")
|
||||
if self.indexerid is None:
|
||||
sqlResults = myDB.select("SELECT s.indexer, se.show_name, se.indexer_id AS 'indexerid' "
|
||||
"FROM scene_exceptions AS se INNER JOIN tv_shows as s "
|
||||
"ON se.indexer_id == s.indexer_id")
|
||||
scene_exceptions = {}
|
||||
for row in sqlResults:
|
||||
indexerid = row["indexerid"]
|
||||
if not indexerid in scene_exceptions:
|
||||
scene_exceptions[indexerid] = []
|
||||
scene_exceptions[indexerid].append(row["show_name"])
|
||||
indexer = row["indexer"]
|
||||
if self.sickbeard_call:
|
||||
if indexerid not in scene_exceptions:
|
||||
scene_exceptions[indexerid] = []
|
||||
scene_exceptions[indexerid].append(row["show_name"])
|
||||
else:
|
||||
if indexerid not in scene_exceptions.get(indexer, {}):
|
||||
scene_exceptions.setdefault(indexer, {})[indexerid] = []
|
||||
scene_exceptions.setdefault(indexer, {})[indexerid].append(row["show_name"])
|
||||
|
||||
else:
|
||||
showObj = helpers.find_show_by_id(sickbeard.showList, {self.indexer: self.indexerid})
|
||||
|
|
|
@ -1732,7 +1732,8 @@ class Home(MainHandler):
|
|||
last_found = ('', ' since %s' % sbdatetime.sbdatetime.fromordinal(
|
||||
showObj.last_found_on_indexer).sbfdate())[1 < showObj.last_found_on_indexer]
|
||||
show_message = (
|
||||
'The master ID of this show has been abandoned%s, ' % last_found
|
||||
'The master ID of this show has been <span class="addQTip" title="many reasons exist, including: '
|
||||
+ '<br>show flagged as a duplicate, removed completely... etc">abandoned</span>%s, ' % last_found
|
||||
+ '<a href="%s/home/editShow?show=%s&tvsrc=0&srcid=%s#core-component-group3">replace it here</a>' % (
|
||||
sickbeard.WEB_ROOT, show, show)
|
||||
+ ('', '<br>%s' % show_message)[0 < len(show_message)])
|
||||
|
@ -2206,8 +2207,10 @@ class Home(MainHandler):
|
|||
# noinspection PyUnresolvedReferences
|
||||
last_found = ('', ' since %s' % sbdatetime.sbdatetime.fromordinal(
|
||||
showObj.last_found_on_indexer).sbfdate())[1 < showObj.last_found_on_indexer]
|
||||
show_message = 'The master ID of this show has been abandoned%s<br>search for ' % last_found + \
|
||||
'a replacement in the "<b>Related show IDs</b>" section of the "<b>Other</b>" tab'
|
||||
show_message = (
|
||||
'The master ID of this show has been <span class="addQTip" title="many reasons exist, including: '
|
||||
+ '\nshow flagged as a duplicate, removed completely... etc">abandoned</span>%s' % last_found
|
||||
+ '<br>search for a replacement in the "<b>Related show IDs</b>" section of the "<b>Other</b>" tab')
|
||||
|
||||
t.show_message = show_message
|
||||
|
||||
|
|
Loading…
Reference in a new issue