When a file is manually replaced, for example after converting from an mp4 to an mkv; radarr decides to delete everything in that movies folder: posters, backdrops, subtitles, NFO files, leaving only the new video file; even though none of these were created or managed by Radarr ever.

This causes Emby to have to rescan/reidentify the item, re-downloading all the extra data, and it’s now lost all custom metadata that was stored in the nfo, particularly the original date added to emby and it now has no subtitles.

How can I prevent this?

  • gccalvin@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    I ran a test and didn’t have this issue, unless I’m missing a step? I don’t usually do this.

    What I did:

    1. Movie #1 (mp4 version) is in the proper folder and Radarr sees it.
    2. Copied over an srt file to the directory that would belong to the movie.
    3. Go to Radarr->Movies>Manual Import
    • a. Navigate to the directory that contains the replacement Movie #2 (mkv version)
    • b. Select “Move Files” as the import mode.
    • c. Click Import.
    1. Movie #2 (mkv version) is imported and shows up in Radarr. The srt file is still there.
    • Darkassassin07OP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      4 months ago

      I’m not changing the files via radarr, external programs are replacing the video file with a new one (usually from converting the original to hevc, mkv; replacing the original):

      Have a movie already imported to Radarr; Manually delete the movie file from outside radarr, then add a new one to the folder. Then return to radarr and click ‘refresh and scan’ or have the scheduled task to scan files run.

      Radarr recognizes the old file is missing and deletes all associated files (images/subtitles/nfo); then separately, sees the replacement video file as new and associates it with the movie for the folder it’s in.

      • gccalvin@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        Ah, okay. Yes, I got the same results as you, even if you do it the opposite way, add a movie through Radarr, and it will replace the other movie and wipe the other data.

        Through my testing, it does seem to only wipe it if Radarr thinks there’s a movie there already. I don’t think this solves your problem, but if you empty the movie folder, scan and refresh radarr, then add the data back, it gets picked up. It only wipes the data when it is replacing it, which is probably intentional because different files might have different metadata? I’m not sure.

        It might be possible with a custom script.

        Before that, take a look at the “Import Extra Files” option under Settings -> Media Management.

        • Darkassassin07OP
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 months ago

          Thing is this is all automated processes, so manually scanning files between changes isn’t really a fix.

          Looks like I’ll be setting up a script to move all the deleted files out of radarrs recycling folder and back into the media folders on a regular basis.

          This is stupid. Radarr didn’t create the files, nor import them; yet it takes it upon itself to delete a bunch of data created/provided by other systems, because it can’t find a file it did actually manage. I was hoping for a setting I’d somehow missed.

          Also; yeah, extra files are enabled, but that only effects newly imported media from a download client; not files discovered/removed from the media folders. (I’ve tested with it off too, no change)

          • gccalvin@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            4 months ago

            Before you spend too much time on that, you can create an issue on the Github page. Seems fairly active. Might get a better response there.

    • Darkassassin07OP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      4 months ago

      If it wasn’t clear, here’s the full breakdown:

      • Movie is added to Radarr monitoring
      • Radarr downloads a release, typically in h264.
      • Emby sees the new movie in its media folders and downloads posters, subtitles, and saves all metadata to an nfo.
      • Emby converts the new file to h265, replacing the original (this may be immediately, or much later)
      • Radarr sees the old file missing and deletes all the metadata Emby had put in the folder with the movie file.
      • Radarr sees the new file and associates it with the movie for the folder its in.

      Before emby scans for the files radarr deleted, it’s trying to serve them to users and failing as they dont exist.

      Once emby does scan the files and remove the missing ones from its db, it has to redownload all the metadata again and no longer has the nfo file telling it the original date added, so the movie is moved to the front of the ‘recently added’ list as if it was a brand new movie.

      This has been consistent across two seprate setups: my original windows 10 based setup, and my current debian-docker setup.