aetaric / checkrr

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

[Feature] Ignore folders with specified name #67

Closed smarthome-enthusiast closed 10 months ago

smarthome-enthusiast commented 10 months ago

Is your feature request related to a problem? Please describe. I don't know if I am missing something during the config of this app but I have looked at instructions on here. I am using a Synology DSM NAS and have this running through docker. All Synology folders have a '@eaDir' folder where "ea" stands for "extended attributes". Those @eaDir-directories would contain files corresponding to those you'll see in the "normal" directory tree and contain the file 'SYNOINDEX_MEDIA_INFO'. I have tried using the ignorepaths list but the folder (and files in it) are still shown in the bad files list resulting in a very long list (considering media is in seperate folders by name).

Describe the solution you'd like If possible, an option like 'ignorefolders' list that will have Checkrr skip the folder if the name matches one on the list i.e '@eaDir' folders (regardless of location) will be skipped.

An option to skip by filename would also be a great feature i.e SYNOINDEX_MEDIA_INFO

aetaric commented 10 months ago

It looks like ignorepaths worked fine for me. Let me know if my test harness somehow doesn't match your environment, but I'm pretty sure I matched it up right...

INFO[0010] File "test/movies/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail (1975).mkv" is not a recognized file type  FFProbe=false Type=Unknown
INFO[0010] Couldn't find a target for file "test/movies/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail (1975).mkv". File is unknown.  Unknown File=true
INFO[0010] "test/music/Rick Astley/Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.aac"  Hash Match=true
INFO[0010] "test/music/Rick Astley/Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.flac"  Hash Match=true
INFO[0010] "test/music/Rick Astley/Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.mp3"  Hash Match=true
INFO[0010] "test/music/Rick Astley/Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.opus"  Hash Match=true
INFO[0010] "test/music/Rick Astley/Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.wav"  Hash Match=true
+---------------------+-------------+
| Files Checked       |          53 |
| Hash Matches        |          51 |
| Hashes Mismatched   |           0 |
| Submitted to Sonarr |           0 |
| Submitted to Radarr |           0 |
| Submitted to Lidarr |           0 |
| Video Files         |           0 |
| Audio Files         |           0 |
| Text or Other Files |           0 |
| Unknown Files       |           2 |
| Elapsed Time        | 973.40225ms |
+---------------------+-------------+
➜  checkrr git:(main) ✗ cat test-noarr.yaml 
checkrr:
  checkpath: 
    - test/tv
    - test/movies
    - test/music
  database: checkrr.db
  ignorehidden: true
  ignorepaths:
    - '@eadir'
  ignoreexts:
    - 'nfo'
    - '.(null)'
    - 'DS_Store'
    - '_DS_Store'
    - '.srt'
    - '.sfv'
    - '.ass'
  csvfile: "./badfiles.csv"
  cron: "* * * * *"
webserver:
  port: 8585
  baseurl: "/"
  ➜  checkrr git:(main) ✗ ls -laR test/music/Rick\ Astley 
total 185320
drwxr-xr-x  8 aetaric  staff       256 Aug 28 11:15 .
drwxr-xr-x  3 aetaric  staff        96 Jan 21  2023 ..
drwxr-xr-x  3 aetaric  staff        96 Aug 28 11:15 @eadir
-rw-r--r--  1 aetaric  staff   5267730 Aug 24  2022 Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.aac
-rw-r--r--  1 aetaric  staff  43718446 Aug 24  2022 Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.flac
-rw-r--r--  1 aetaric  staff   5090786 Aug 24  2022 Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.mp3
-rw-r--r--  1 aetaric  staff   3389969 May  4  2022 Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.opus
-rw-r--r--  1 aetaric  staff  37406318 Aug 24  2022 Rick Astley - Never Gonna Give You Up (Official Music Video)-dQw4w9WgXcQ.wav

test/music/Rick Astley/@eadir:
total 9944
drwxr-xr-x  3 aetaric  staff       96 Aug 28 11:15 .
drwxr-xr-x  8 aetaric  staff      256 Aug 28 11:15 ..
-rw-r--r--  1 aetaric  staff  5090786 Aug 28 11:15 ignore_this_file.bad
aetaric commented 10 months ago

Closing after a week of inactivity. The current feature set seems to already have this covered. If there's a bug with this, please file a new issue.