From 31ab22b6aa8bdf0b8f779fe6b279abbf59f255a0 Mon Sep 17 00:00:00 2001 From: Justin Emter Date: Tue, 5 Dec 2017 10:55:48 -0800 Subject: [PATCH] @MoRBiD MaNGLeR, added condition for 'media.duration' to default at 1 if no duration exists. --- PseudoChannel.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PseudoChannel.py b/PseudoChannel.py index 9edac8b..8426df7 100644 --- a/PseudoChannel.py +++ b/PseudoChannel.py @@ -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),