def build_fragments_list(boot_info):
 res = []
 segment_run_table = boot_info[u'segments'][0]
 fragment_run_entry_table = boot_info[u'fragments'][0][u'fragments']
 first_frag_number = fragment_run_entry_table[0][u'first']
 fragments_counter = itertools.count(first_frag_number)
 for (segment, fragments_count) in segment_run_table[u'segment_run']:
  if ((fragments_count == 4294967295) and boot_info[u'live']):
   fragments_count = 2
  for _ in range(fragments_count):
   res.append((segment, next(fragments_counter)))
 if boot_info[u'live']:
  res = res[(-2):]
 return res

def build_fragments_list ( boot_info ) : res = [ ] segment_run_table = boot_info [ u'segments' ] [ 0 ] fragment_run_entry_table = boot_info [ u'fragments' ] [ 0 ] [ u'fragments' ] first_frag_number = fragment_run_entry_table [ 0 ] [ u'first' ] fragments_counter = itertools . count ( first_frag_number ) for ( segment , fragments_count ) in segment_run_table [ u'segment_run' ] : if ( ( fragments_count == 4294967295 ) and boot_info [ u'live' ] ) : fragments_count = 2 for _ in range ( fragments_count ) : res . append ( ( segment , next ( fragments_counter ) ) ) if boot_info [ u'live' ] : res = res [ ( - 2 ) : ] return res
return a list of for each fragment in the video .