[soundcloud] Code review fixes

This commit is contained in:
Cory Hall 2019-02-01 17:02:28 -05:00
parent 18f015fdf1
commit 3dd3463e2d

View File

@ -402,19 +402,17 @@ class SoundcloudPagedPlaylistBaseIE(SoundcloudPlaylistBaseIE):
return permalink_url, entry_id, title return permalink_url, entry_id, title
for e in collection: for e in collection:
tr_dict = e.get('track') extractor = None
pl_dict = e.get('playlist') if isinstance(e.get('track'), dict):
# if entry has track data, attach extractor key
extractor = SoundcloudIE.ie_key()
permalink_url, entry_id, entry_title = resolve_permalink_url( permalink_url, entry_id, entry_title = resolve_permalink_url(
(e, tr_dict, pl_dict)) (e, e.get('track'), e.get('playlist')))
if permalink_url: if permalink_url:
entry_data = self.url_result( entry_data = self.url_result(
permalink_url, permalink_url,
video_id=entry_id, video_title=entry_title) ie=extractor, video_id=entry_id, video_title=entry_title)
if isinstance(tr_dict, dict):
# if entry has track data, attach extractor key
entry_data['ie_key'] = SoundcloudIE.ie_key()
entries.append(entry_data) entries.append(entry_data)