@MoRBiD MaNGLeR, added condition for 'media.duration' to default at 1 if no duration exists.

This commit is contained in:
Justin Emter
2017-12-05 10:55:48 -08:00
parent 00e9f88b8a
commit 31ab22b6aa

View File

@@ -124,7 +124,15 @@ class PseudoChannel():
backgroundImgURL = ''
if isinstance(backgroundImagePath.art, str):
backgroundImgURL = config.baseurl+backgroundImagePath.art+"?X-Plex-Token="+config.token
self.db.add_shows_to_db(2, media.title, media.duration, '', backgroundImgURL, media.key, section.title)
self.db.add_shows_to_db(
2,
media.title,
media.duration if media.duration else 1,
'',
backgroundImgURL,
media.key,
section.title
)
self.print_progress(
i + 1,
len(sectionMedia),