Merge pull request #1317 from croneter/fix-valueerror
Fix ValueError: invalid literal for int() for invalid dates sent by Plex
This commit is contained in:
commit
69d473c92b
2 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ class FillMetadataQueue(common.LibrarySyncMixin,
|
||||||
plex_id = int(xml.get('ratingKey'))
|
plex_id = int(xml.get('ratingKey'))
|
||||||
checksum = int('{}{}'.format(
|
checksum = int('{}{}'.format(
|
||||||
plex_id,
|
plex_id,
|
||||||
xml.get('updatedAt',
|
abs(int(xml.get('updatedAt',
|
||||||
xml.get('addedAt', '1541572987')).replace('-', '')))
|
xml.get('addedAt', '1541572987'))))))
|
||||||
if (not self.repair and
|
if (not self.repair and
|
||||||
plexdb.checksum(plex_id, section.plex_type) == checksum):
|
plexdb.checksum(plex_id, section.plex_type) == checksum):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -230,8 +230,8 @@ class Base(object):
|
||||||
addedAt is used.
|
addedAt is used.
|
||||||
"""
|
"""
|
||||||
return int('%s%s' % (self.xml.get('ratingKey'),
|
return int('%s%s' % (self.xml.get('ratingKey'),
|
||||||
self.xml.get('updatedAt') or
|
abs(int(self.xml.get('updatedAt') or
|
||||||
self.xml.get('addedAt', '1541572987')))
|
self.xml.get('addedAt', '1541572987')))))
|
||||||
|
|
||||||
def title(self):
|
def title(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue