aetaric / checkrr

Checkrr Scans your library files for corrupt media and replace the files via sonarr and radarr
MIT License
196 stars 9 forks source link

[BUG] Symlinks #101

Closed EsmailELBoBDev2 closed 2 weeks ago

EsmailELBoBDev2 commented 1 month ago

I mapped it to symlinks folders that mapped to another place, will it work? because so far it detected all files even it's symlink dir is correct

EsmailELBoBDev2 commented 1 month ago

UPDATE: It kinda fixed when I added the source of symlinks (did not change config, just allowed compose to access source of symlinks) and it only report errors on files with error input output

aetaric commented 1 month ago

checkrr uses Go's filepath.WalkDir() function to grab every file under the directories specified in the checkpath config directive. This function effectively resolves if the path provided is a directory or a file. While a symlink can link to a directory, it's a file that does so[1]. It looks like go's logic is to treat it as a file and not a directory based on testing. So no, symlinks aren't supported.

What are you trying to accomplish with symlinks that docker's volume mapping or checkrr's arr mapping directive[2] can't resolve?

[1] https://linux.die.net/man/7/symlink [2] https://github.com/aetaric/checkrr/blob/main/checkrr.yaml.example#L37-L38

EsmailELBoBDev2 commented 1 month ago

I use realdebrid with zurg (rclone) and use symlinks with arrs to map them. so I wanted like make checkrr follow the symlink to see if og file there or not

I already added the path of source of symlinks it did fix a little but all files were mismatched in hash

It was like checkrr can't see valid files so after added the source it stopped from unknown file to mismatched hash file with both files error input and output but was able to play them fine on plex

aetaric commented 1 month ago

Mismatched just means the hash recorded in the DB didn't match the hash of the file it checked on disk. if I am understanding realdebrid correctly, that might be somewhat expected? Future runs for files that are stable and non-changing should report hash match.

EsmailELBoBDev2 commented 1 month ago

Mismatched just means the hash recorded in the DB didn't match the hash of the file it checked on disk. if I am understanding realdebrid correctly, that might be somewhat expected? Future runs for files that are stable and non-changing should report hash match.

okay I will run it 2 times to test for second run and let you know, thanks for headsup

aetaric commented 2 weeks ago

Closing for inactivity, if this is still an issue, leave a comment and I'll reopen it.