From 7ae403d9fd0b7bc01656aa7b9b53d798ad503c49 Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Tue, 26 Apr 2016 03:14:37 -0300 Subject: [PATCH] [myspace] Fix issues for merging of all songs of an artist inclusion --- youtube_dl/extractor/myspace.py | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/youtube_dl/extractor/myspace.py b/youtube_dl/extractor/myspace.py index 876b7299b..fc1dbfbde 100644 --- a/youtube_dl/extractor/myspace.py +++ b/youtube_dl/extractor/myspace.py @@ -203,33 +203,20 @@ class MySpaceAlbumIE(InfoExtractor): entries = [ self.url_result(t_path, ie=MySpaceIE.ie_key()) for t_path in tracks_paths] - return { - '_type': 'playlist', - 'id': playlist_id, - 'display_id': display_id, - 'title': self._og_search_title(webpage), - 'entries': entries, - } + return self.playlist_result(entries, playlist_id, self._og_search_title(webpage)) class MySpaceArtistSongsIE(InfoExtractor): IE_NAME = 'MySpace:artist:songs' _VALID_URL = r'https?://myspace\.com/(?P[^/]*)/music/songs' - _TESTS = [{ - 'url': 'https://myspace.com/starset2/music/album/transmissions-19455773', - 'url': 'https://myspace.com/ryanlewismusic/music/songs', - 'info_dict': { - 'title': 'RYAN LEWIS', - }, - 'playlist_count': 8, - }, { + _TEST = { 'url': 'https://myspace.com/studio99/music/songs/', 'info_dict': { 'title': 'Studio 99 IS CLOSED!! R.I.P.', }, 'playlist_count': 4, - }] + } def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -247,9 +234,4 @@ class MySpaceArtistSongsIE(InfoExtractor): # if we invert this if, we get album urls. but not all music are in alba. # Also the musics in alba are already here individually - return { - '_type': 'playlist', - 'display_id': display_id, - 'title': self._og_search_title(webpage), - 'entries': entries, - } + return self.playlist_result(entries, playlist_title=self._og_search_title(webpage))