ensure channel_indexed field in pending downloads, #932

This commit is contained in:
Simon
2025-05-22 21:39:53 +07:00
parent 6789cc90d8
commit 72d81cc45a
2 changed files with 37 additions and 5 deletions

View File

@@ -344,11 +344,8 @@ class PendingList(PendingIndex):
"duration": get_duration_str(vid["duration"]),
"published": published,
"timestamp": int(datetime.now().timestamp()),
# Pulling enum value out so it is serializable
"vid_type": vid_type.value,
"channel_indexed": vid["channel_id"] in self.all_channels,
}
if self.all_channels:
youtube_details.update(
{"channel_indexed": vid["channel_id"] in self.all_channels}
)
return youtube_details