Adjust for a queue instead of a list

This commit is contained in:
tcely 2025-05-19 07:36:37 -04:00 committed by GitHub
parent 01fcf5ec66
commit 4cbcd76885
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -316,7 +316,10 @@ def index_source_task(source_id):
end=task.verbose_name.find('Index'),
)
tvn_format = '{:,}' + f'/{num_videos:,}'
for vn, video in enumerate(videos, start=1):
vn = 0
while len(videos) > 0:
vn += 1
video = videos.popleft()
# Create or update each video as a Media object
key = video.get(source.key_field, None)
if not key: