perf: `default=`->`or` to avoid creating useless lists

pull/12688/head
DarkCat09 4 months ago
parent 44ed9058e9
commit 70e0c591be
No known key found for this signature in database

@ -814,7 +814,7 @@ class VKMusicBaseIE(VKBaseIE):
# ['Main Artist', 'Feat. Artist'] # ['Main Artist', 'Feat. Artist']
'artists': traverse_obj( 'artists': traverse_obj(
(*meta[17], *meta[18]) if len_ >= 18 else None, (*meta[17], *meta[18]) if len_ >= 18 else None,
(..., 'name'), default=[artist]), (..., 'name')) or [artist],
'duration': int_or_none(meta[5]) if len_ >= 5 else None, 'duration': int_or_none(meta[5]) if len_ >= 5 else None,
'thumbnails': [{'url': thumbnail}] if thumbnail else [], 'thumbnails': [{'url': thumbnail}] if thumbnail else [],

Loading…
Cancel
Save