Open vnckppl opened 5 years ago
mps-youtube-develop/mps_youtube/commands/search.py
@command(r'url\s(.*[-_a-zA-Z0-9]{11}.*)', 'url')
def yt_url(url, print_title=0):
""" Acess videos by urls. """
url_list = url.split()
g.model.songs = []
for u in url_list:
try:
p = util.get_pafy(u)
g.browse_mode = "normal"
v = Video(p.videoid, p.title, p.length)
g.model.songs.append(v)
except (IOError, ValueError) as e:
g.message = c.r + str(e) + c.w
g.content = g.content or content.generate_songlist_display(
zeromsg=g.message)
if not g.command_line:
g.content = content.generate_songlist_display()
if print_title:
util.xprint(v.title)
That has to be fixed, I'm also interested in importing a list of urls and not stopping at the first failure.
Is it possible to automatically continue with the next item in the playlist if the current item is not available (e.g., after receiving the message 'Problem playing last item: HTTP Error 403: Forbidden').