Optional setting to remove deleted files from history when processing "Sync converted files"

MCEBuddy Version: 2.7.1

Operating System: Windows 10 IoT Enterprise LTSC 2021 x64

Summary of the suggestion: I am using the “General Settings → Sync converted files” option to keep converted files on my file server in sync with source files on my media drive. There is a lot of churn in my library due to source files being added, moved, and deleted. When a source file is deleted, MCEBuddy deletes the converted files, which is a great feature and perfect for my workflow. However, there are some downsides to the current implementation:

  1. The conversion job stays in the history file indefinitely, causing the file to increasingly bloat.
  2. Parsing of the history file becomes increasingly slower with media churn due to #1.
  3. Scanning becomes increasingly slower with media churn due to #1.
  4. If a source file is reintroduced with the same name and location at a later time, MCEBuddy ignores it indefinitely since it already exists in the history file due to #1.

With the proposed “Remove deleted files from history” option enabled, when the source file is deleted, the converted file would be automatically deleted (as happens currently), and then the source and converted files would be automatically removed from the history file so they will not be tracked any longer. Side observation: This effectively makes the history file a database of currently tracked files, and not so much a historical record.

I am aware that I can enable “Expert Settings → Re-monitor recorded videos” in the monitor location settings to cause MCEBuddy to ignore the source file’s information in the history file and convert it again. The problem is that this causes a re-conversion on every scan if I do not also select “Expert Settings → Delete original file” or “Expert Settings → Archive original file”, which breaks my use case, so it is not a solution. It also does not solve the other problems associated with increasing history file bloat.

I am currently working around this behavior with a script I have written which executes nightly and “scrubs” the history file. The script parses mcebuddy.log and looks for the text “[source] is stopped being monitored since it has been deleted”. For each instance, it extracts the source path from the log text, then uses that to find and delete both the converted file record and the source file record from the history file. This works remarkably well and solves all of the issues outlined above, with some drawbacks:

  1. “System Settings → Logging Level” must be set to Debug, which causes more disk churn and slows MCEBuddy down slightly.
  2. “System Settings → Logfile age” must be set to a high number to avoid records of the deleted files being aged out of the log prior to the nightly script executing when there is a lot of media churn. This means my nightly script has more to parse.
  3. If a source file is reintroduced with the same name and location at a later time, MCEBuddy ignores it until the next day (after the nightly script runs).
  4. It’s one more thing for me to maintain.

If MCEBuddy could support the proposed functionality natively by just removing the records from history when the source file is deleted, it would solve the problem more efficiently and be very helpful to me.

Thanks for reading!