HaveAGitGat / Tdarr

Tdarr - Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking (Windows, macOS, Linux & Docker)
Other
3.05k stars 96 forks source link

Tdarr forgets succesfull transcodes keeps re-queuing after completion in Tdarr #1117

Closed Dennis0162 closed 1 week ago

Dennis0162 commented 1 week ago

Describe the bug

I'm experiencing an issue where my transcoding queue in Tdarr "forgets" all the files that have already been transcoded. This results in those files being re-added back into the queue, causing them to be processed again. I have not noticed a clear trigger or specific event that causes this to happen. It appears to occur randomly, and I have not found a pattern to it.

This issue is particularly problematic because refreshing the library isn't a viable solution for me—I would lose all the history of my files, which I’m trying to avoid.

To Reproduce

Steps to reproduce the behavior:

  1. Add files to the transcoding queue.
  2. Allow Tdarr to complete the transcoding jobs.
  3. Notice that, after some time, the same files reappear in the queue for transcoding.
  4. This happens without any manual intervention or clear trigger.

Expected behavior

Once a file is transcoded successfully, it should be marked as completed and not re-queued unless explicitly triggered. The transcoding history should be maintained to prevent unnecessary re-processing.

Screenshots

If necessary, I can provide screenshots of the Tdarr interface showing the repeated entries in the queue. Transcoded que almost empty after a night of only successful trancodes image the report viewer shows that there must be allot more succesfull transcodes image

Environment Details

Configuration Details

Additional Context

I searched online and found a few other users experiencing similar issues, but I have not found a definitive solution. I’m trying to avoid refreshing the library as it causes a loss of file history.

Request

Is this a known bug, or are there any recommended fixes? Any help would be greatly appreciated!


Dennis0162 commented 1 week ago

Here's a polished version:


Resolving Repeated Transcoding Issues in Tdarr

Sharing this here in case someone else encounters the same issue.

Description

I was facing an issue where Tdarr was repeatedly reprocessing already transcoded files. After some investigation, I discovered that the problem was related to manual filename changes I made in Radarr/Sonarr due to issues with the applyRadarrOrSonarrNamingPolicy integration. Unknowingly, this interfered with Tdarr’s queue management.

Specifically, I was using a filename format that included the codec tag ([{Mediainfo VideoCodec}]). This caused the filenames to change after transcoding (e.g., from x264 to x265), which led Tdarr to recognize these files as new and add them back into the queue, triggering unnecessary reprocessing.

Solution

I addressed the issue by modifying my workflow:

  1. Switched to a Different Plugin: I replaced the original plugin, which was not properly detecting the need for renaming, with Tdarr Plugin scha_rename_based_on_codec_schadi. This plugin correctly handles the renaming process and prevents files from being re-queued unnecessarily.

  2. Adjusted Automation Workflow: I let Tdarr handle the renaming internally and then notify Radarr/Sonarr afterward using the notifyRadarrOrSonarr plugin. This ensures that the filename changes do not disrupt Tdarr’s ability to recognize files that have already been processed.

Since implementing these changes, the transcoding queue is functioning correctly, and files are no longer being mistakenly re-added for processing.

Closing Notes

I hope this information helps anyone facing similar challenges. Thanks to the community for your support and suggestions!