From 4a49a2f498bdb1dc9851436f64a519cd96dd4dd8 Mon Sep 17 00:00:00 2001 From: realRobotix <82544307+realRobotix@users.noreply.github.com> Date: Tue, 5 Dec 2023 23:29:32 +0100 Subject: [PATCH] [Epidemic Sound] use index as id instead of slug --- youtube_dl/extractor/epidemicsound.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/youtube_dl/extractor/epidemicsound.py b/youtube_dl/extractor/epidemicsound.py index 699195294..1a52738aa 100644 --- a/youtube_dl/extractor/epidemicsound.py +++ b/youtube_dl/extractor/epidemicsound.py @@ -18,7 +18,8 @@ class EpidemicSoundIE(InfoExtractor): 'url': 'https://www.epidemicsound.com/track/yFfQVRpSPz/', 'md5': 'd98ff2ddb49e8acab9716541cbc9dfac', 'info_dict': { - 'id': 'yFfQVRpSPz', + 'id': '45014', + 'display_id': 'yFfQVRpSPz', 'ext': 'mp3', 'tags': ['foley', 'door', 'knock', 'glass', 'window', 'glass door knock'], 'title': 'Door Knock Door 1', @@ -27,15 +28,16 @@ class EpidemicSoundIE(InfoExtractor): 'timestamp': 1415320353, 'upload_date': '20141107', 'age_limit': None, - # check that the "best" format was found, since test file MD5 doesn't - # distinguish the formats + # check that the "best" format was found, since test file MD5 doesn't + # distinguish the formats 'format': 'full', }, }, { 'url': 'https://www.epidemicsound.com/track/mj8GTTwsZd/', 'md5': 'c82b745890f9baf18dc2f8d568ee3830', 'info_dict': { - 'id': 'mj8GTTwsZd', + 'id': '148700', + 'display_id': 'mj8GTTwsZd', 'ext': 'mp3', 'tags': ['liquid drum n bass', 'energetic'], 'title': 'Noplace', @@ -76,6 +78,7 @@ class EpidemicSoundIE(InfoExtractor): self._sort_formats(formats) info = traverse_obj(json_data, { + 'id': ('id', T(txt_or_none)), 'tags': ('metadataTags', Ellipsis, T(txt_or_none)), 'title': ('title', T(txt_or_none)), 'duration': ('length', T(float_or_none)), @@ -91,7 +94,7 @@ class EpidemicSoundIE(InfoExtractor): })) info.update({ - 'id': video_id, + 'display_id': video_id, 'formats': formats, })