[myspace] Fix issues for merging of all songs of an artist inclusion

This commit is contained in:
Allan Daemon 2016-04-26 03:14:37 -03:00 committed by Allan Daemon
parent 48da538f7d
commit 7ae403d9fd

View File

@ -203,33 +203,20 @@ class MySpaceAlbumIE(InfoExtractor):
entries = [ entries = [
self.url_result(t_path, ie=MySpaceIE.ie_key()) self.url_result(t_path, ie=MySpaceIE.ie_key())
for t_path in tracks_paths] for t_path in tracks_paths]
return { return self.playlist_result(entries, playlist_id, self._og_search_title(webpage))
'_type': 'playlist',
'id': playlist_id,
'display_id': display_id,
'title': self._og_search_title(webpage),
'entries': entries,
}
class MySpaceArtistSongsIE(InfoExtractor): class MySpaceArtistSongsIE(InfoExtractor):
IE_NAME = 'MySpace:artist:songs' IE_NAME = 'MySpace:artist:songs'
_VALID_URL = r'https?://myspace\.com/(?P<artist>[^/]*)/music/songs' _VALID_URL = r'https?://myspace\.com/(?P<artist>[^/]*)/music/songs'
_TESTS = [{ _TEST = {
'url': 'https://myspace.com/starset2/music/album/transmissions-19455773',
'url': 'https://myspace.com/ryanlewismusic/music/songs',
'info_dict': {
'title': 'RYAN LEWIS',
},
'playlist_count': 8,
}, {
'url': 'https://myspace.com/studio99/music/songs/', 'url': 'https://myspace.com/studio99/music/songs/',
'info_dict': { 'info_dict': {
'title': 'Studio 99 IS CLOSED!! R.I.P.', 'title': 'Studio 99 IS CLOSED!! R.I.P.',
}, },
'playlist_count': 4, 'playlist_count': 4,
}] }
def _real_extract(self, url): def _real_extract(self, url):
mobj = re.match(self._VALID_URL, 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. # 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 # Also the musics in alba are already here individually
return { return self.playlist_result(entries, playlist_title=self._og_search_title(webpage))
'_type': 'playlist',
'display_id': display_id,
'title': self._og_search_title(webpage),
'entries': entries,
}