ignore playlist error in post processing and channel indexing, #1032
This commit is contained in:
parent
94745c7f84
commit
7bae974aa6
|
|
@ -241,13 +241,21 @@ class YoutubeChannel(YouTubeItem):
|
|||
]
|
||||
self.task.send_progress(message, progress=(idx + 1) / total)
|
||||
|
||||
@staticmethod
|
||||
def _index_single_playlist(playlist):
|
||||
def _index_single_playlist(self, playlist):
|
||||
"""add single playlist if needed"""
|
||||
from playlist.src.index import YoutubePlaylist
|
||||
|
||||
playlist = YoutubePlaylist(playlist[0])
|
||||
playlist.update_playlist(skip_on_empty=True)
|
||||
try:
|
||||
playlist = YoutubePlaylist(playlist[0])
|
||||
playlist.update_playlist(skip_on_empty=True)
|
||||
except ValueError as err:
|
||||
message = [
|
||||
f"{self.youtube_id}: skip failed playlist import",
|
||||
str(err),
|
||||
]
|
||||
print(message)
|
||||
if self.task:
|
||||
self.task.send_progress(message)
|
||||
|
||||
def get_channel_videos(self):
|
||||
"""get all videos from channel"""
|
||||
|
|
|
|||
|
|
@ -386,8 +386,19 @@ class DownloadPostProcess(DownloaderBase):
|
|||
if not playlist_id or not idx or not total:
|
||||
break
|
||||
|
||||
playlist = YoutubePlaylist(playlist_id)
|
||||
playlist.update_playlist(skip_on_empty=True)
|
||||
try:
|
||||
playlist = YoutubePlaylist(playlist_id)
|
||||
playlist.update_playlist(skip_on_empty=True)
|
||||
except ValueError as err:
|
||||
message = [
|
||||
f"{playlist_id}: skip failed playlist import",
|
||||
str(err),
|
||||
]
|
||||
print(message)
|
||||
if self.task:
|
||||
self.task.send_progress(message)
|
||||
|
||||
continue
|
||||
|
||||
if not self.task:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue