Skip to content

Sonarr ​

Setting the Right PUID and PGID for Media Files ​

When installing Sonarr, be sure to set PUID and PGID to the same user account that Unraid is using when creating folders in your Media-TV shared folder

For example, the user gary with uid 1000 is used when creating folder in Media-TV shared folder. In order to allow Sonarr to move any video files to this folder, you have to run Sonarr as the same UID and GID as the one that "owns" the Media-TV folder. Otherwise you will encounter Access denied issue when trying to move any video files from other path to this Media-TV folder

root@Voyager:/mnt/user/appdata/sonarr# ls -alh /mnt/user/Media-TV | more
total 620K
drwxrwxrwx 1 nobody users 4.0K Dec 28 09:54 ./
drwxrwxrwx 1 nobody users  209 Dec 10 08:20 ../
drwxrwxr-x 1 gary    1000 4.0K Aug 24 14:25 2\ Broke\ Girls/
drwxrwxr-x 1 gary    1000 4.0K Sep 20 05:40 60\ Minutes/
drwxrwxr-x 1 gary    1000 4.0K Sep 13 11:52 8\ Simple\ Rules/
drwxrwxr-x 1 gary    1000 4.0K Aug 24 17:27 According\ to\ Jim/
drwxrwxr-x 1 gary    1000 4.0K Aug 24 22:04 Adventure\ Time/
drwxrwxr-x 1 gary    1000  244 Sep 13 11:46 Alex,\ Inc/
drwxrwxr-x 1 gary    1000 4.0K Sep 16 23:37 Alias/
drwxrwxr-x 1 gary    1000 4.0K Sep 13 16:22 Alone/
drwxrwxr-x 1 gary    1000 4.0K Sep 13 12:23 America's\ Got\ Talent/
drwxrwxr-x 1 gary    1000 4.0K Sep 13 13:59 American\ Crime/
drwxrwxr-x 1 gary    1000 4.0K Dec 28 09:23 American\ Dad!/
drwxrwxr-x 1 gary    1000 4.0K Aug 25 00:14 American\ Horror\ Story/
drwxrwxr-x 1 gary    1000 4.0K Sep 13 16:09 American\ Housewife/
...

E.g. I'm creating a user called 'gary' to access my Media-TV folder. So I'll get the UID and GID for this user and pass it to PUID and PGID within Sonarr container creation page.

# get uid (user ID)
root@Voyager:/mnt/user/appdata/sonarr# id -u gary
1000

# get gid (group ID)
root@Voyager:/mnt/user/appdata/sonarr# id -g gary
100

Example settings:

Start sonarr and check the config folder and make sure the sonarr container is using your Unraid username to create its config files in the config folder. With this set, you should then be able to ask Sonarr to move files to your Media-TV folder since they both belonged to the same user.

root@Voyager:/mnt/user/appdata/sonarr# ls -alh
total 2.5M
drwxr-xr-x 1 gary   users  210 Dec 28 09:58 ./
drwxrwxrwx 1 nobody users  144 Dec 28 09:52 ../
drwxr-xr-x 1 gary   users   10 Dec 28 09:54 .config/
drwxr-xr-x 1 gary   users    2 Dec 28 09:55 MediaCover/
-rw-r--r-- 1 gary   users  485 Dec 28 09:54 config.xml
drwxr-xr-x 1 gary   users   20 Dec 28 09:54 logs/
-rw-r--r-- 1 gary   users  44K Dec 28 09:54 logs.db
-rw-r--r-- 1 gary   users  32K Dec 28 09:56 logs.db-shm
-rw-r--r-- 1 gary   users 278K Dec 28 09:56 logs.db-wal
-rw-r--r-- 1 gary   users 2.1M Dec 28 09:58 sonarr.db
-rw-r--r-- 1 gary   users  32K Dec 28 09:58 sonarr.db-shm
-rw-r--r-- 1 gary   users    0 Dec 28 09:58 sonarr.db-wal
-rw-r--r-- 1 gary   users    3 Dec 28 09:54 sonarr.pid

FAQ ​

Starting from Radarr/Sonarr v4, quality truimph over custom score. In other words, even if the custom score for a release is the highest in the list, if there is a better quality such as 2160p over 1080p, that will take precedence.

The solution is to merge the quality together so that they are equal, then score will be compared. See https://trash-guides.info/Radarr/Tips/Merge-quality/

Example release quality for a profile.

Untitled

Required vs Negate in Custom Format ​

@ref: https://www.reddit.com/r/sonarr/comments/12hmyw9/required_vs_negate_in_custom_formats/

Required - this custom format won't be applied to a release unless this condition is met. If you've got two conditions with Required set, then the format will only be applied to releases that match both of those. If you don't have required set, it will apply to releases that have at least one of the conditions.

Negate - Apply this format to releases that don't have these criteria.

This means that if you have a condition for your "High ranked words", but you also want to exclude a release group that tag their crappy releases with those words, you could add a Release Group condition, set it to negate (so match if the release group isn't this) and required (the release must not be from this group to get the extra points)

If a different group puts out a release with your preferred terms, that release will score higher (+100). If the crappy group puts out a release with those same terms, it won't score higher than releases without the terms (+0).

Collection of Custom Formats ​

https://trash-guides.info/Sonarr/sonarr-collection-of-custom-formats