mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
Both fields have existed on the model and been shown in the File Manager for some time, but nothing ever wrote to them — every file in every library appeared to have never been printed. Now on_print_complete's queue-status update path calls a small _bump_library_file_usage_if_completed() helper that increments print_count and stamps last_printed_at on the source library file whenever a queued print completes successfully. Failed, cancelled and user-aborted prints are intentionally skipped so the fields represent successful usage rather than attempt count. Unblocks sorting the File Manager by last-printed date and is a prerequisite for the scheduled-purge feature requested in #1008, which is held until we see whether manual sort+bulk-delete covers the use case.