Plex does not add new media

Server Version#: 1.19.2.2711
Player Version#: 6.10.1?

Im running plex inside a jail on Freenas.

I have an issue regarding new media being added to plex.
When i add a new folder with a movie inside of it to the movie library folder that plex is watching over, plex will not add it to the library. If i change the view in plex from “Movies” to “Folders” the folder for the new movie will show up, but it will be shown as empty, even though it is not…

I have found a workaround, but it is not a good one. If i move the newly added movie folder out from the library folder, and then put it back in, plex will find the movie and add it to the library…

This also happens for TV-Shows…

The permissions is set up correctly, and has always worked until this issue appeared. So i doubt that this has anything to do with permissions at all.

Naming convention is also as it should be. I have never changed how the naming is done on my media, but after the newest update this issue appeared.
Naming convention is as follows:

Movies
Aladdin (2019)
Aladdin (2019) Remux-2160p.mkv

Any help will be much appreciated!

Logs are added:)
Plex Media Server Logs_2020-04-29_11-22-28.zip (3.8 MB)

After adding a new movie, in this case Batman Begins, i can see these lines in the log:

Apr 29, 2020 11:22:10.908 [0x809218000] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 31 current media items and 1 section locations in the database...
Apr 29, 2020 11:22:10.971 [0x809218000] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Apr 29, 2020 11:22:10.971 [0x809218000] DEBUG -   * Scanning /mnt/movies
Apr 29, 2020 11:22:10.971 [0x809218000] DEBUG - Scanner: Processing directory /mnt/movies (parent: no)
Apr 29, 2020 11:22:10.973 [0x809218000] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.
Apr 29, 2020 11:22:10.977 [0x809218000] DEBUG - Scanner: Processing directory /mnt/movies/Batman Begins (2005) (parent: yes)
Apr 29, 2020 11:22:10.977 [0x809218000] DEBUG - Skipping over directory 'Batman Begins (2005)', as nothing has changed; removing 0 media items from map.
Apr 29, 2020 11:22:10.977 [0x809218000] DEBUG - HTTP requesting PUT http://127.0.0.1:32400/activities/db777b31-bd5a-4335-a0d5-cbd7d20e32b0?percentComplete=%2B3%2E09375&subtitle=Batman

After adding a new movie, in this case Batman Begins, i can see these lines in the log…

You’re starting the scanner manually righ? FreeBSD doesn’t support auto scan when files are added!

Can you post a screenshot of when this happens and you’re in both views?

If the folder shows it means PMS did detect it but it might still be trying to match it (I’ll take a peak at logs to confirm)

When you say player version “6.0.1” what player is that? Do you see the same on plex web?

No i’m actually not. Im using the tab “Connect” in sonarr. That looks like this:

Of what do you want screenshots? im not sure what you mean. Do you mean in both folder and move view? In that case the movie view does not change at all, while the folder view adds a folder named Batman Begins (2005).

Yes it shows, but its empty.
If i just move the movie folder out of the library folder and back In, it adds in plex just fine.

Its just the player version on iOS.

When you say plex web, what do you mean about that?:slight_smile:

Plex Web as in “app.plex.tv” or the bundled web app in the server (IP:32400/web)

I would start the scan via the web rather then sonarr to test first! That’s a 3rd party app and I’m not sure if its doing the right thing.

Also be careful in puting username/password for plex in other apps! Hopefully sonarr is safe enough but its still a 3rd party app.

If this woks fine when started from web I would suggest contacting sonnar devs. but lets try it out first.

Still the same… tried removing the sonarr connection, and then scanned manually from web… Still just getting the empty folder.

What is putting the files there originally? and how do you move out/in again?

I wonder if its some permissions issue.

I may be way off here. but…
I’m not sure the exact setup and see this issue happens to series aswell, but isn’t Sonarr for tv shows. Will it trigger the correct libraries to update if you are adding movies?

Good call @NewPlaza I didn’t even think of that; but I’m not super familiar of how those software work; It does seem however that sonnar is for tv and radarr for movies!

The connect action is supposedly triggered after certain actions (import or rename i.e. at least for sonarr)

But its also stated this fails with normal scan, and moving the file out and back works! So I’m gonna bet on permissions/ownership.

Can you do a ls of the file when imported/renamed by sonarr (so before you move it out)?

And then again after you do the move.

I just used Sonarr as an example, and that made things unclear. Sorry about that. I have both Sonarr and radarr set up and they both use the connection to trigger Plex to update library. This setup has worked flawlessly until it suddenly didn’t. I guess that a new update could cause this.

Now I have already tried removing both connections and only used the manual scan in Plex web, with the same result:/

@mikec_pt on the folders the permissions is exactly the same before and after I move the files out and back in again. But when taking a closer look at the permissions of the movie file inside, I see that something has changed. I do not have a clue why this has changed, and I don’t know how to fix it either.

Here is the permissions of one that has imported automatically (Alita), and one that does not import automatically (Batman begins).
So clearly something has happened that changed the permissions that is being set on the initial transfer to the library folder. And as stated before, I really do not understand this suddenly has happened without me even touching one setting.

And after moving the folder for Batman out and back in again (did this on a SMB share on a windows client that I access with the newmedia user) the permissions of the movie file itself looks like this:

Shouldn’t the permissions be the same for the folder and the movie itself?

This makes sense because Plex is running as they Plex user and then needs the everyone permission to be set to read.

I know that this isn’t the best way to do this. But I haven’t found a good way to do this with datasets and users inside of a jail that is not present as a user in freenas directly.

I’m open for suggestions. And many thanks for pointing out that this could be permissions once again. I did just check the permissions in windows until today, and that does not show these differences.

When you move using smb it is likely using a different “umask” and thus “fixing it for you”. From what I read sonnar only messes with files if you use “rename” so I doubt its sonarr/radarr fault, especially radarr, I can see that it likely makes more sense to user sonarr to rename things for better matching; If you happen to be using a download client in sonar/radarr then it might be that software that sets the permissions wrong!

Honestly the best way to set this all up is to have the plex user own the media; and the easiest way to do it is to have the “jail user id” own it on the host! Meaning on FreeNAS you set ownership like so: chown -R 972 /path (972 is the default user id for plex in freebsd but you can also confirm that is the case in the jail shell)

Both sonarr and radarr is set to rename files before moving, this is to make naming consistent and compliant with Plex naming convention.

The funny thing is that this has never been a problem before… I fixed it now by enabling set permission like this in Sonarr/radarr:

I could set Plex as owner, but the way I have set this up is to make radarr and Sonarr run as the user “newmedia” so that I only have one user for those. It might be better to create users for each service and put them into a group, and then make that group owner on the detaset holding the media files? Somehow radarr and Sonarr needs to have access to the files as well.

As for now it seems like Plex only have permissions through everyone read?

I might have to redo everything:o but you would put Plex user as owner ? And the. Put the other users for the other services in a group and add it to group owner?

Mine adds new media however Is anyone getting an issue where iOS is not reading the server library or refreshing correctly. iPad and iPhone still displays old content but not mac or apple tv or LG.

Web Plex is fine and in sync with library. iOS is old and shows contents as unavailable.

Deleted app several times and still getting the issue.

Thanks,

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.