return complete vid_entry dict from scan

This commit is contained in:
Simon
2025-07-06 21:59:26 +07:00
parent 66f37a92d3
commit b6d38e9319
3 changed files with 12 additions and 11 deletions

View File

@@ -258,8 +258,8 @@ class PendingList(PendingIndex):
video_results = ChannelSubscription().get_last_youtube_videos(
url, limit=False, query_filter=vid_type
)
for video_id, _, vid_type in video_results:
self._add_video(video_id, vid_type)
for video_entry in video_results:
self._add_video(video_entry["id"], video_entry["vid_type"])
def _parse_playlist(self, url):
"""add all videos of playlist to list"""

View File

@@ -65,12 +65,9 @@ class ChannelSubscription:
if not channel_query:
continue
last_videos.extend(
[
(i["id"], i["title"], vid_type)
for i in channel_query["entries"]
]
)
for entry in channel_query["entries"]:
entry["vid_type"] = vid_type
last_videos.append(entry)
return last_videos
@@ -93,7 +90,9 @@ class ChannelSubscription:
if last_videos:
ids_to_add = is_missing([i[0] for i in last_videos])
for video_id, _, vid_type in last_videos:
for video_entry in last_videos:
video_id = video_entry["id"]
vid_type = video_entry["vid_type"]
if video_id in ids_to_add:
missing_videos.append((video_id, vid_type))