- format_id = '%s-%s-%s' % (
- fd['delivery'], fd['quality'], fd['quality_string'])
- if determine_ext(fd['src']) == 'm3u8':
+ src = url_or_none(fd.get('src'))
+ if not src:
+ continue
+ format_id_list = []
+ for key in ('delivery', 'quality', 'quality_string'):
+ value = fd.get(key)
+ if value:
+ format_id_list.append(value)
+ format_id = '-'.join(format_id_list)
+ ext = determine_ext(src)
+ if ext == 'm3u8':