X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=resources%2Flib%2FMSL.py;h=0b623f86d57584b1de13befd1df90f40649a4356;hb=27a18564ddbf17c7897981d732f5570d5eefa19e;hp=83a06ee37b5fc0e19d625a4a50d8c61e8c4787be;hpb=f2154ed9821a052d1c145f7bdf219f4d9386af81;p=plugin.video.netflix.git diff --git a/resources/lib/MSL.py b/resources/lib/MSL.py index 83a06ee..0b623f8 100644 --- a/resources/lib/MSL.py +++ b/resources/lib/MSL.py @@ -152,9 +152,13 @@ class MSL: # Audio 'heaac-2-dash', + + #subtiltes 'dfxp-ls-sdh', - 'simplesdh', - 'nflx-cmisc', + #'simplesdh', + #'nflx-cmisc', + + #unkown 'BIF240', 'BIF320' ], @@ -349,6 +353,26 @@ class MSL: segment_base = ET.SubElement(rep, 'SegmentBase', indexRange="0-"+str(init_length), indexRangeExact="true") ET.SubElement(segment_base, 'Initialization', range='0-'+str(init_length)) + # Multiple Adaption Set for subtiles + for text_track in manifest['textTracks']: + print text_track + if 'downloadables' not in text_track or text_track['downloadables'] is None: + continue + subtiles_adaption_set = ET.SubElement(period, 'AdaptationSet', + lang=text_track['bcp47'], + contentType='text', + mimeType='text/ttml') + for downloadable in text_track['downloadables']: + rep = ET.SubElement(subtiles_adaption_set, 'Representation', + bandwidth='0', + nflxProfile=downloadable['contentProfile'] + ) + print downloadable['urls'] + ET.SubElement(rep, 'BaseURL').text = self.__get_base_url(downloadable['urls']) + + + + xml = ET.tostring(root, encoding='utf-8', method='xml') xml = xml.replace('\n', '').replace('\r', '')