1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-05 17:05:03 -05:00

Merge pull request #2 from dmarcelino/trakt-fixes

Fix 'first_aired' date parsing
This commit is contained in:
M. Adam Kendall 2015-02-01 11:36:18 -05:00
commit cfb518ffa6

View File

@ -51,7 +51,7 @@ from sickbeard.scene_numbering import get_scene_numbering, set_scene_numbering,
get_xem_numbering_for_show, get_scene_absolute_numbering_for_show, get_xem_absolute_numbering_for_show, \
get_scene_absolute_numbering
from lib.dateutil import tz
from lib.dateutil import tz, parser as dateutil_parser
from lib.unrar2 import RarFile
from lib import adba, subliminal
from lib.trakt import TraktAPI
@ -2245,7 +2245,7 @@ class HomeAddShows(Home):
[int(show['ids'][indexers[sickbeard.TRAKT_DEFAULT_INDEXER - 1]]),
'http://www.trakt.tv/shows/%s' % show['ids']['slug'], show['title'],
show['overview'],
datetime.date.fromtimestamp(int(show['first_aired']) / 1000.0).strftime('%Y%m%d')]
None if show['first_aired'] is None else dateutil_parser.parse(show['first_aired']).strftime('%Y%m%d')]
for show in recommendedlist if not helpers.findCertainShow(sickbeard.showList, [
int(show['ids'][indexers[sickbeard.TRAKT_DEFAULT_INDEXER - 1]])])))
except (traktException, traktAuthException, traktServerBusy) as e: