mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:59:39 +00:00
handle API stop
This commit is contained in:
@@ -217,6 +217,9 @@ class PendingList(PendingIndex):
|
||||
total = len(self.youtube_ids)
|
||||
for idx, entry in enumerate(self.youtube_ids):
|
||||
self._process_entry(entry, idx, total)
|
||||
if self.task and self.task.is_stopped():
|
||||
break
|
||||
|
||||
rand_sleep(self.config)
|
||||
if not self.task:
|
||||
continue
|
||||
@@ -282,6 +285,9 @@ class PendingList(PendingIndex):
|
||||
if video_id in self.to_skip:
|
||||
continue
|
||||
|
||||
if self.task and self.task.is_stopped():
|
||||
break
|
||||
|
||||
if self.flat:
|
||||
if not video_data.get("channel"):
|
||||
channel_name = channel_handler.json_data["channel_name"]
|
||||
@@ -326,6 +332,9 @@ class PendingList(PendingIndex):
|
||||
if video_id in self.to_skip:
|
||||
continue
|
||||
|
||||
if self.task and self.task.is_stopped():
|
||||
break
|
||||
|
||||
if self.flat:
|
||||
if not video_data.get("channel"):
|
||||
video_data["channel"] = playlist.youtube_meta["channel"]
|
||||
|
||||
Reference in New Issue
Block a user