Fixed BG Image bug.

This commit is contained in:
Justin Emter
2017-07-21 09:01:40 -07:00
parent 480894fb9c
commit fbdd21c392
2 changed files with 17 additions and 7 deletions

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@ pseudo-tv.db-journal
*.pyc *.pyc
old/ old/
pseudo-channel.db pseudo-channel.db
*.db-journal

View File

@@ -38,11 +38,19 @@ class PseudoDailyScheduleController():
''' '''
def get_show_photo(self, section, title): def get_show_photo(self, section, title):
backgroundImagePath = self.PLEX.library.section(section).get(title) backgroundImagePath = None
backgroundImgURL = '' backgroundImgURL = ''
if isinstance(backgroundImagePath.art, str): try:
backgroundImagePath = self.PLEX.library.section(section).get(title)
except:
return backgroundImgURL
if backgroundImagePath != None and isinstance(backgroundImagePath.art, str):
backgroundImgURL = self.BASE_URL+backgroundImagePath.art+"?X-Plex-Token="+self.TOKEN backgroundImgURL = self.BASE_URL+backgroundImagePath.art+"?X-Plex-Token="+self.TOKEN
@@ -306,7 +314,8 @@ class PseudoDailyScheduleController():
timeB, timeB,
self.get_show_photo( self.get_show_photo(
row[11], row[11],
row[3]), row[3]
),
datalist datalist
) )
) )