aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/tonline.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/tonline.py')
-rw-r--r--hypervideo_dl/extractor/tonline.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/hypervideo_dl/extractor/tonline.py b/hypervideo_dl/extractor/tonline.py
index cc11eae..9b6a40d 100644
--- a/hypervideo_dl/extractor/tonline.py
+++ b/hypervideo_dl/extractor/tonline.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import int_or_none, join_nonempty
class TOnlineIE(InfoExtractor):
@@ -30,13 +30,8 @@ class TOnlineIE(InfoExtractor):
asset_source = asset.get('source') or asset.get('source2')
if not asset_source:
continue
- formats_id = []
- for field_key in ('type', 'profile'):
- field_value = asset.get(field_key)
- if field_value:
- formats_id.append(field_value)
formats.append({
- 'format_id': '-'.join(formats_id),
+ 'format_id': join_nonempty('type', 'profile', from_dict=asset),
'url': asset_source,
})