Check that filename differs

main
Bob Mottram 2025-07-11 10:25:30 +01:00
parent efd4490101
commit 2becc66595
1 changed files with 4 additions and 0 deletions

View File

@ -4755,12 +4755,16 @@ def _create_box_items(base_dir: str,
}
first_post_id = replace_strings(first_post_id, replacements)
prev_post_filename = None
try:
with open(index_filename, 'r', encoding='utf-8') as fp_index:
posts_added_to_timeline = 0
while posts_added_to_timeline < items_per_page:
post_filename = fp_index.readline()
if post_filename == prev_post_filename:
break
prev_post_filename = post_filename
if not post_filename:
break