Merge branch 'RickDB-master' into develop
This commit is contained in:
commit
946254d86c
1 changed files with 25 additions and 5 deletions
|
@ -30,6 +30,7 @@ http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-pyt
|
||||||
(and others...)
|
(and others...)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import logging
|
import logging
|
||||||
from time import time
|
from time import time
|
||||||
import urllib2
|
import urllib2
|
||||||
|
@ -2186,12 +2187,31 @@ class API():
|
||||||
# Several streams/files available.
|
# Several streams/files available.
|
||||||
dialoglist = []
|
dialoglist = []
|
||||||
for entry in self.item.findall('./Media'):
|
for entry in self.item.findall('./Media'):
|
||||||
|
fileName = ''
|
||||||
|
audioLanguage = ''
|
||||||
|
|
||||||
|
# Get additional info (filename / languages)
|
||||||
|
mediaPartEntry = self.item.find('./Media/Part')
|
||||||
|
if mediaPartEntry is not None:
|
||||||
|
# Filename
|
||||||
|
if 'file' in mediaPartEntry.attrib:
|
||||||
|
fileName = os.path.basename(mediaPartEntry.attrib['file'])
|
||||||
|
|
||||||
|
# Languages - subtitle does not seem to be directly included in this stream info
|
||||||
|
mediaPartStreamEntry = self.item.find('./Media/Part/Stream')
|
||||||
|
if mediaPartStreamEntry is not None:
|
||||||
|
# Audio language
|
||||||
|
if 'language' in mediaPartStreamEntry.attrib:
|
||||||
|
audioLanguage = mediaPartStreamEntry.attrib['language']
|
||||||
|
|
||||||
dialoglist.append(
|
dialoglist.append(
|
||||||
"%sp %s - %s (%s)"
|
"%sp %s - %s (%s) (%s) %s" %
|
||||||
% (entry.attrib.get('videoResolution', 'unknown'),
|
(entry.attrib.get('videoResolution', 'unknown'),
|
||||||
entry.attrib.get('videoCodec', 'unknown'),
|
entry.attrib.get('videoCodec', 'unknown'),
|
||||||
entry.attrib.get('audioProfile', 'unknown'),
|
entry.attrib.get('audioProfile', 'unknown'),
|
||||||
entry.attrib.get('audioCodec', 'unknown'))
|
entry.attrib.get('audioCodec', 'unknown'),
|
||||||
|
audioLanguage,
|
||||||
|
fileName)
|
||||||
)
|
)
|
||||||
media = xbmcgui.Dialog().select('Select stream', dialoglist)
|
media = xbmcgui.Dialog().select('Select stream', dialoglist)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue