Merge pull request #1137 from croneter/fix-album
Fix TypeError: 'NoneType' object has no attribute '__getitem__', e.g. when displaying albums
This commit is contained in:
commit
7ede0566c8
1 changed files with 18 additions and 12 deletions
|
@ -69,6 +69,9 @@ class File(object):
|
||||||
% self.grandparent_id())
|
% self.grandparent_id())
|
||||||
else:
|
else:
|
||||||
path = 'plugin://%s/' % v.ADDON_TYPE[self.plex_type]
|
path = 'plugin://%s/' % v.ADDON_TYPE[self.plex_type]
|
||||||
|
if self.plex_type in (v.PLEX_TYPE_MOVIE,
|
||||||
|
v.PLEX_TYPE_CLIP,
|
||||||
|
v.PLEX_TYPE_EPISODE):
|
||||||
# Filename in Kodi will end with actual filename - hopefully
|
# Filename in Kodi will end with actual filename - hopefully
|
||||||
# this is useful for other add-ons
|
# this is useful for other add-ons
|
||||||
filename = self.file_path(force_first_media=force_first_media)
|
filename = self.file_path(force_first_media=force_first_media)
|
||||||
|
@ -81,6 +84,9 @@ class File(object):
|
||||||
return
|
return
|
||||||
entirepath = ('%s?mode=play&plex_id=%s&plex_type=%s&filename=%s'
|
entirepath = ('%s?mode=play&plex_id=%s&plex_type=%s&filename=%s'
|
||||||
% (path, self.plex_id, self.plex_type, filename))
|
% (path, self.plex_id, self.plex_type, filename))
|
||||||
|
else:
|
||||||
|
entirepath = ('%s?mode=play&plex_id=%s&plex_type=%s'
|
||||||
|
% (path, self.plex_id, self.plex_type))
|
||||||
# For Kodi DB, we need to safe the ENTIRE path for filenames
|
# For Kodi DB, we need to safe the ENTIRE path for filenames
|
||||||
filename = entirepath
|
filename = entirepath
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue