mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
More unicode to int issues resolved
This commit is contained in:
parent
cecd35bb5d
commit
57fabbad8b
1 changed files with 7 additions and 7 deletions
|
@ -233,13 +233,13 @@ def _xem_refresh(indexer_id, indexer):
|
||||||
u'Looking up XEM scene mapping for show %s on %s' % (indexer_id, sickbeard.indexerApi(int(indexer)).name,),
|
u'Looking up XEM scene mapping for show %s on %s' % (indexer_id, sickbeard.indexerApi(int(indexer)).name,),
|
||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
data = requests.get("http://thexem.de/map/all?id=%s&origin=%s&destination=scene" % (
|
data = requests.get("http://thexem.de/map/all?id=%s&origin=%s&destination=scene" % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],), verify=False).json()
|
indexer_id, sickbeard.indexerApi(int(indexer)).config['xem_origin'],), verify=False).json()
|
||||||
|
|
||||||
if data is None or data == '':
|
if data is None or data == '':
|
||||||
logger.log(u'No XEN data for show "%s on %s", trying TVTumbler' % (
|
logger.log(u'No XEN data for show "%s on %s", trying TVTumbler' % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).name,), logger.MESSAGE)
|
indexer_id, sickbeard.indexerApi(int(indexer)).name,), logger.MESSAGE)
|
||||||
data = requests.get("http://show-api.tvtumbler.com/api/thexem/all?id=%s&origin=%s&destination=scene" % (
|
data = requests.get("http://show-api.tvtumbler.com/api/thexem/all?id=%s&origin=%s&destination=scene" % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],), verify=False).json()
|
indexer_id, sickbeard.indexerApi(int(indexer)).config['xem_origin'],), verify=False).json()
|
||||||
if data is None or data == '':
|
if data is None or data == '':
|
||||||
logger.log(u'TVTumbler also failed for show "%s on %s". giving up.' % (indexer_id, indexer,),
|
logger.log(u'TVTumbler also failed for show "%s on %s". giving up.' % (indexer_id, indexer,),
|
||||||
logger.MESSAGE)
|
logger.MESSAGE)
|
||||||
|
@ -257,20 +257,20 @@ def _xem_refresh(indexer_id, indexer):
|
||||||
cacheDB.action(
|
cacheDB.action(
|
||||||
"INSERT INTO xem_numbering (indexer, indexer_id, season, episode, scene_season, scene_episode) VALUES (?,?,?,?,?,?)",
|
"INSERT INTO xem_numbering (indexer, indexer_id, season, episode, scene_season, scene_episode) VALUES (?,?,?,?,?,?)",
|
||||||
[indexer, indexer_id, entry[sickbeard.indexerApi(indexer).config['xem_origin']]['season'],
|
[indexer, indexer_id, entry[sickbeard.indexerApi(indexer).config['xem_origin']]['season'],
|
||||||
entry[sickbeard.indexerApi(indexer).config['xem_origin']]['episode'],
|
entry[sickbeard.indexerApi(int(indexer)).config['xem_origin']]['episode'],
|
||||||
entry['scene']['season'], entry['scene']['episode']])
|
entry['scene']['season'], entry['scene']['episode']])
|
||||||
if 'scene_2' in entry: # for doubles
|
if 'scene_2' in entry: # for doubles
|
||||||
cacheDB.action(
|
cacheDB.action(
|
||||||
"INSERT INTO xem_numbering (indexer, indexer_id, season, episode, scene_season, scene_episode) VALUES (?,?,?,?,?,?)",
|
"INSERT INTO xem_numbering (indexer, indexer_id, season, episode, scene_season, scene_episode) VALUES (?,?,?,?,?,?)",
|
||||||
[indexer, indexer_id, entry[sickbeard.indexerApi(indexer).config['xem_origin']]['season'],
|
[indexer, indexer_id, entry[sickbeard.indexerApi(indexer).config['xem_origin']]['season'],
|
||||||
entry[sickbeard.indexerApi(indexer).config['xem_origin']]['episode'],
|
entry[sickbeard.indexerApi(int(indexer)).config['xem_origin']]['episode'],
|
||||||
entry['scene_2']['season'], entry['scene_2']['episode']])
|
entry['scene_2']['season'], entry['scene_2']['episode']])
|
||||||
else:
|
else:
|
||||||
logger.log(u'Failed to get XEM scene data for show %s from %s because "%s"' % (
|
logger.log(u'Failed to get XEM scene data for show %s from %s because "%s"' % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).name, result['message']), logger.DEBUG)
|
indexer_id, sickbeard.indexerApi(int(indexer)).name, result['message']), logger.DEBUG)
|
||||||
else:
|
else:
|
||||||
logger.log(u"Empty lookup result - no XEM data for show %s on %s" % (
|
logger.log(u"Empty lookup result - no XEM data for show %s on %s" % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).name,), logger.DEBUG)
|
indexer_id, sickbeard.indexerApi(int(indexer)).name,), logger.DEBUG)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.log(u"Exception while refreshing XEM data for show " + str(indexer_id) + " on " + sickbeard.indexerApi(
|
logger.log(u"Exception while refreshing XEM data for show " + str(indexer_id) + " on " + sickbeard.indexerApi(
|
||||||
indexer).name + ": " + ex(e), logger.WARNING)
|
indexer).name + ": " + ex(e), logger.WARNING)
|
||||||
|
|
Loading…
Reference in a new issue