mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 08:54:33 +01:00
[vevo] make use of --no-playlist
option
This commit is contained in:
parent
6f3222f5a2
commit
e1237665e5
@ -367,6 +367,9 @@ class VevoPlaylistIE(VevoBaseIE):
|
|||||||
'genre': 'Hip-Hop',
|
'genre': 'Hip-Hop',
|
||||||
},
|
},
|
||||||
'expected_warnings': ['Unable to download SMIL file'],
|
'expected_warnings': ['Unable to download SMIL file'],
|
||||||
|
'params': {
|
||||||
|
'noplaylist': True,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.vevo.com/watch/genre/rock?index=0',
|
'url': 'http://www.vevo.com/watch/genre/rock?index=0',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -400,8 +403,15 @@ class VevoPlaylistIE(VevoBaseIE):
|
|||||||
qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
|
qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
|
||||||
index = qs.get('index', [None])[0]
|
index = qs.get('index', [None])[0]
|
||||||
|
|
||||||
if index:
|
if self._downloader.params.get('noplaylist') and index:
|
||||||
return self._url_result(playlist['videos'][int(index)]['isrc'], 0)
|
isrc = playlist['videos'][int(index)]['isrc']
|
||||||
|
self.to_screen(
|
||||||
|
'Downloading just video %s because of --no-playlist' % isrc)
|
||||||
|
return self._url_result(isrc, 0)
|
||||||
|
|
||||||
|
self.to_screen(
|
||||||
|
'Downloading playlist %s - add --no-playlist'
|
||||||
|
' to just download video' % playlist_id)
|
||||||
|
|
||||||
entries = [
|
entries = [
|
||||||
self._url_result(src['isrc'], i)
|
self._url_result(src['isrc'], i)
|
||||||
|
Loading…
Reference in New Issue
Block a user