[koreader] Fix list access bug

This commit is contained in:
2024-11-19 20:46:25 -05:00
parent 3c7940c6c6
commit d294f2ecd1

View File

@ -442,7 +442,8 @@ def process_koreader_sqlite_file(file_path, user_id) -> list:
created = [] created = []
if new_scrobbles: if new_scrobbles:
created = Scrobble.objects.bulk_create(new_scrobbles) created = Scrobble.objects.bulk_create(new_scrobbles)
send_notifications_for_scrobble(created.last().id) if created:
send_notifications_for_scrobble(created[-1].id)
fix_long_play_stats_for_scrobbles(created) fix_long_play_stats_for_scrobbles(created)
logger.info( logger.info(
f"Created {len(created)} scrobbles", f"Created {len(created)} scrobbles",