Fix getting Stream metadata
This commit is contained in:
parent
927c8bf36f
commit
681e57b350
2 changed files with 4 additions and 10 deletions
|
@ -1788,15 +1788,11 @@ class API():
|
||||||
# TODO: what if several Media tags exist?!?
|
# TODO: what if several Media tags exist?!?
|
||||||
# Loop over parts
|
# Loop over parts
|
||||||
for child in item[0][0]:
|
for child in item[0][0]:
|
||||||
part = child.attrib
|
container = child.attrib['container'].lower()
|
||||||
container = part['container'].lower()
|
|
||||||
# Loop over Streams
|
# Loop over Streams
|
||||||
for grandchild in child:
|
for grandchild in child:
|
||||||
mediaStream = grandchild.attrib
|
mediaStream = grandchild.attrib
|
||||||
try:
|
type = int(mediaStream['streamType'])
|
||||||
type = mediaStream['streamType']
|
|
||||||
except KeyError:
|
|
||||||
type = None
|
|
||||||
if type == 1: # Video streams
|
if type == 1: # Video streams
|
||||||
videotrack = {}
|
videotrack = {}
|
||||||
videotrack['videocodec'] = mediaStream['codec'].lower()
|
videotrack['videocodec'] = mediaStream['codec'].lower()
|
||||||
|
@ -1841,11 +1837,12 @@ class API():
|
||||||
subtitlelanguages.append(mediaStream['language'])
|
subtitlelanguages.append(mediaStream['language'])
|
||||||
except:
|
except:
|
||||||
subtitlelanguages.append("Unknown")
|
subtitlelanguages.append("Unknown")
|
||||||
return {
|
media = {
|
||||||
'video': videotracks,
|
'video': videotracks,
|
||||||
'audio': audiotracks,
|
'audio': audiotracks,
|
||||||
'subtitle': subtitlelanguages
|
'subtitle': subtitlelanguages
|
||||||
}
|
}
|
||||||
|
return media
|
||||||
|
|
||||||
def getAllArtwork(self, parentInfo=False):
|
def getAllArtwork(self, parentInfo=False):
|
||||||
|
|
||||||
|
|
|
@ -472,7 +472,6 @@ class LibrarySync(threading.Thread):
|
||||||
movies = itemtypes.Movies(embycursor, kodicursor)
|
movies = itemtypes.Movies(embycursor, kodicursor)
|
||||||
|
|
||||||
views = plx.GetPlexCollections('movie')
|
views = plx.GetPlexCollections('movie')
|
||||||
self.logMsg("Movie folders found: %s" % views, 1)
|
|
||||||
|
|
||||||
if compare:
|
if compare:
|
||||||
# Pull the list of movies and boxsets in Kodi
|
# Pull the list of movies and boxsets in Kodi
|
||||||
|
@ -480,7 +479,6 @@ class LibrarySync(threading.Thread):
|
||||||
all_kodimoviesId = dict(emby_db.getChecksum('Movie'))
|
all_kodimoviesId = dict(emby_db.getChecksum('Movie'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
all_kodimoviesId = {}
|
all_kodimoviesId = {}
|
||||||
self.logMsg("all_kodimoviesId: %s " % (all_kodimoviesId), 1)
|
|
||||||
all_plexmoviesIds = []
|
all_plexmoviesIds = []
|
||||||
|
|
||||||
##### PROCESS MOVIES #####
|
##### PROCESS MOVIES #####
|
||||||
|
@ -525,7 +523,6 @@ class LibrarySync(threading.Thread):
|
||||||
plex_checksum = API.getChecksum()
|
plex_checksum = API.getChecksum()
|
||||||
all_plexmoviesIds.append(plex_checksum)
|
all_plexmoviesIds.append(plex_checksum)
|
||||||
updatelist.append(itemid)
|
updatelist.append(itemid)
|
||||||
self.logMsg("Movies to update for %s: %s" % (viewName, updatelist), 1)
|
|
||||||
|
|
||||||
total = len(updatelist)
|
total = len(updatelist)
|
||||||
if pdialog:
|
if pdialog:
|
||||||
|
|
Loading…
Reference in a new issue