checkrr icon indicating copy to clipboard operation
checkrr copied to clipboard

[BUG] Files that meet cut-off are not reaquired.

Open AdamWHY2K opened this issue 11 months ago • 6 comments

Describe the bug If checkrr identifies a file that should be reaquired, but the file already meets the quality cut-off, then it will never be reaquired (even if radarr can find an equal quality release) with the error "Existing file on disk meets quality cutoff" or "Existing file on disk has a equal or higher Custom Format score".

To Reproduce

  1. Have malformed movie file
  2. Set Radarr quality profile to upgrades allowed
  3. Set upgrade until to the same quality as the broken file
  4. Run checkrr

Expected behavior The broken file should be reaquired, even if it means at a less optimal quality (as long as it's within the quality profile).

Screenshots

Image

Image

Image

Desktop (please complete the following information):

  • OS: Linux 6.12.12+bpo-amd64 SMP PREEMPT_DYNAMIC Debian 6.12.12-1~bpo12+1 (2025-02-23) x86_64 GNU/Linux
  • Browser: Brave Version 1.76.80 Chromium: 134.0.6998.118 (Official Build) (64-bit)
  • checkrr Version: v3.5.4

Additional context Simple fix would probably be to move the file to a temporary folder before sending the reaquire event, then moving it back if no release was found/deleting it if a release is found.

AdamWHY2K avatar Mar 22 '25 00:03 AdamWHY2K

Checkrr doesn't act on the files directly, it asks the arr services to delete them on it's behalf [1]. Does your radarr instance have read/write perms to the files it's tracking or just read only?

if it's the former, what version of radarr are you running so I can get a parity setup going to test for this, if it's the latter then that's your problem.

[1] https://github.com/aetaric/checkrr/blob/main/connections/radarr.go#L63

aetaric avatar Apr 07 '25 04:04 aetaric

Hey, thanks for the reply.

Radarr does have rw: Image Image

I don't see any related permission errors or any references to deleting files in the radarr log.

I'm running Radarr version: 5.21.1.9799 — Mar 24 2025 and this is the quality profile I'm running: Image

AdamWHY2K avatar Apr 07 '25 05:04 AdamWHY2K

I have noticed this particular problem on my Windows installation of Checkrr as well. I can't see anything in the Radarr logs showing that the file gets deleted before a search starts for the film. It doesn't seem to indicate in my logs that the reason it doesn't download a new copy is because of it meeting the cutoff though.

I am believing it is the same issue reported here as so far the only file that has successfully been parsed was also a film whose quality upgraded on the new file.

I can delete files from the Radarr UI without issue which confirms it has read/write permissions over the files it creates.

Running the latest version of Radarr 5.22.4.9896

YorkieFl avatar May 08 '25 23:05 YorkieFl

I can confirm that I have this problem as well. Looking at the Radarr log I only see search / disk scan upon reacquire:

Image

While when I manually delete a file from disk using the Radarr UI:

Image

Jamie4224 avatar May 18 '25 20:05 Jamie4224

I think radarr deprecated an API path I was using. I have another way of doing it lined up after reading the docs so I should have this fixed soon.

aetaric avatar Jun 17 '25 04:06 aetaric

Can I ping you for an update on this pls @aetaric :) I miss this tool 😅

AdamWHY2K avatar Sep 28 '25 02:09 AdamWHY2K

Was there ever a fix for this or workaround?

joelang1699 avatar Jan 13 '26 17:01 joelang1699

Still seems to be broken 😭

2026-02-07 12:44:07.9|Fatal|RadarrErrorPipeline|Request Failed. DELETE /api/v3/moviefile/bulk

[v6.0.4.10291] System.ApplicationException: Expected query to return 1 rows but returned 0
   at NzbDrone.Core.Datastore.BasicRepository`1.Get(IEnumerable`1 ids) in ./NzbDrone.Core/Datastore/BasicRepository.cs:line 145
   at NzbDrone.Core.MediaFiles.MediaFileService.GetMovies(IEnumerable`1 ids) in ./NzbDrone.Core/MediaFiles/MediaFileService.cs:line 108
   at Radarr.Api.V3.MovieFiles.MovieFileController.DeleteMovieFiles(MovieFileListResource resource) in ./Radarr.Api.V3/MovieFiles/MovieFileController.cs:line 180
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Radarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/BufferingMiddleware.cs:line 27
   at Radarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/IfModifiedMiddleware.cs:line 40
   at Radarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/CacheHeaderMiddleware.cs:line 32
   at Radarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/StartingUpMiddleware.cs:line 37
   at Radarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/UrlBaseMiddleware.cs:line 28
   at Radarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/VersionMiddleware.cs:line 28
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

AdamWHY2K avatar Feb 07 '26 12:02 AdamWHY2K

Still seems to be broken 😭

2026-02-07 12:44:07.9|Fatal|RadarrErrorPipeline|Request Failed. DELETE /api/v3/moviefile/bulk

[v6.0.4.10291] System.ApplicationException: Expected query to return 1 rows but returned 0
   at NzbDrone.Core.Datastore.BasicRepository`1.Get(IEnumerable`1 ids) in ./NzbDrone.Core/Datastore/BasicRepository.cs:line 145
   at NzbDrone.Core.MediaFiles.MediaFileService.GetMovies(IEnumerable`1 ids) in ./NzbDrone.Core/MediaFiles/MediaFileService.cs:line 108
   at Radarr.Api.V3.MovieFiles.MovieFileController.DeleteMovieFiles(MovieFileListResource resource) in ./Radarr.Api.V3/MovieFiles/MovieFileController.cs:line 180
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Radarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/BufferingMiddleware.cs:line 27
   at Radarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/IfModifiedMiddleware.cs:line 40
   at Radarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/CacheHeaderMiddleware.cs:line 32
   at Radarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/StartingUpMiddleware.cs:line 37
   at Radarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/UrlBaseMiddleware.cs:line 28
   at Radarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Radarr.Http/Middleware/VersionMiddleware.cs:line 28
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

~~This error implies that the file id being passed doesn't exist. That file ID is obtained from Radarr directly and then passed into the delete endpoint. At this point I am thinking you probably have some sort of collision in names and it's breaking the path compare. I'm going to toss some error handling and debug logging in the connectors on the main branch later today, if you are able to build checkrr locally, please try it with that debug logic and debug enabled. I am curious what output is obtained.~~

I see why now. I'll get a patch out in the next few days.

aetaric avatar Feb 07 '26 17:02 aetaric

Patched in main, feel free to local compile and try it if you like, I'll get the I18n and additional debug lines added tomorrow.

aetaric avatar Feb 08 '26 03:02 aetaric