diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 4bea7b65..2b1f6f03 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1788,15 +1788,11 @@ class API(): # TODO: what if several Media tags exist?!? # Loop over parts for child in item[0][0]: - part = child.attrib - container = part['container'].lower() + container = child.attrib['container'].lower() # Loop over Streams for grandchild in child: mediaStream = grandchild.attrib - try: - type = mediaStream['streamType'] - except KeyError: - type = None + type = int(mediaStream['streamType']) if type == 1: # Video streams videotrack = {} videotrack['videocodec'] = mediaStream['codec'].lower() @@ -1841,11 +1837,12 @@ class API(): subtitlelanguages.append(mediaStream['language']) except: subtitlelanguages.append("Unknown") - return { + media = { 'video': videotracks, 'audio': audiotracks, 'subtitle': subtitlelanguages } + return media def getAllArtwork(self, parentInfo=False): diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index cacb8586..d56c9c0c 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -472,7 +472,6 @@ class LibrarySync(threading.Thread): movies = itemtypes.Movies(embycursor, kodicursor) views = plx.GetPlexCollections('movie') - self.logMsg("Movie folders found: %s" % views, 1) if compare: # Pull the list of movies and boxsets in Kodi @@ -480,7 +479,6 @@ class LibrarySync(threading.Thread): all_kodimoviesId = dict(emby_db.getChecksum('Movie')) except ValueError: all_kodimoviesId = {} - self.logMsg("all_kodimoviesId: %s " % (all_kodimoviesId), 1) all_plexmoviesIds = [] ##### PROCESS MOVIES ##### @@ -525,7 +523,6 @@ class LibrarySync(threading.Thread): plex_checksum = API.getChecksum() all_plexmoviesIds.append(plex_checksum) updatelist.append(itemid) - self.logMsg("Movies to update for %s: %s" % (viewName, updatelist), 1) total = len(updatelist) if pdialog: