From 79a5e77e7940626774a4963790615db4373b5d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3FUTF-8=3Fq=3FSergey=3D20M=3DE2=3D80=3DA4=3F=3D?= Date: Fri, 26 Feb 2021 16:13:15 +0100 Subject: [PATCH] =?UTF-8?q?[mixcloud:playlist:base]=20Fix=20video=20id=20e?= =?UTF-8?q?xtraction=20in=20flat=20playlist=20mod=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …e (refs #27787) --- haruhi_dl/extractor/mixcloud.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/haruhi_dl/extractor/mixcloud.py b/haruhi_dl/extractor/mixcloud.py index 37f16a791..69319857d 100644 --- a/haruhi_dl/extractor/mixcloud.py +++ b/haruhi_dl/extractor/mixcloud.py @@ -251,11 +251,9 @@ class MixcloudPlaylistBaseIE(MixcloudBaseIE): cloudcast_url = cloudcast.get('url') if not cloudcast_url: continue - video_id = cloudcast.get('slug') - if video_id: - owner_username = try_get(cloudcast, lambda x: x['owner']['username'], compat_str) - if owner_username: - video_id = '%s_%s' % (owner_username, video_id) + slug = try_get(cloudcast, lambda x: x['slug'], compat_str) + owner_username = try_get(cloudcast, lambda x: x['owner']['username'], compat_str) + video_id = '%s_%s' % (owner_username, slug) if slug and owner_username else None entries.append(self.url_result( cloudcast_url, MixcloudIE.ie_key(), video_id))