+ # 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'])
+
+
+
+