Certain items not being added to library

Server Version#: 1.18.7.2457

A while ago I reorganised my Plex libraries so that I could separate items like BBC nature documentaries from movies and drama series. I have libraries for Movies and Documentary Features, which both use the Plex Movies database, and libraries for TV Series and Documentary Series which both use TheTVDB database. Most items are processed just fine.

However I have found several films which will not add to the library if I place them in the Documentary Features folder and rescan the library, but they will add to the library if I place them in the Movies folder instead. I cannot see anything different in the two libraries’ specs which would cause this.

Today I was trying to add the feature “Capital in the 21st Century (2019)” to the Documentary Features. I checked the title in the Plex Movie website and in IMDB.com for good measure. But Plex would not display it - not even unmatched - if I placed the files in the Documentary Features subfolder. It showed up immediately when I moved it to the Movies subfolder.

What am I likely to have got wrong setting this up?

Cheers
T

IMDB/Plex Movie doesn’t do Documentaries well (if at all).
TMDB will have most of them - in my experience.

Some of those Documentary ‘Movies’ will be somewhere in TV Shows, if you can find them.

Sometimes - Fix Match/Search Options/Personal Media - then Hand Edit - is a viable option when you really want to keep Documentaries in Movies, instead of TV Shows, and Vice Versa, of course.

If you ‘invent’ a TV Show Documentary with Personal Media Shows - they must be structured and named as TV Shows, or they will be invisible. <—hard to edit if you can’t see it
lol

I would think changing the Agent to TMDB for your ‘Documentaries’ Movie Library would solve most of the issues you’re having.

Hi

Just had the same problem occur with a documentary series: “Walking the Himalayas (2015)”.

I have two libraries for TV shows: “TV Shows” and “Documentary Series”. When I edit the libraries I can see that both libraries have every single option identically set (apart from the path of the folder containing the media). Both use TheTVDB to match titles, and “Walking the Himalayas” is listed at TheTVDB.

When I copy the media to the server (Media/Documentary Series/Walking the Himalayas (2015)/Season 1/Walking the Himalayas - s01e01.mp4 etc.) and then scan the Documentary Series library from the menu, nothing happens. I can check the alerts and see every other series in the media folder is listed as being scanned but “Walking the Himalayas” doesn’t appear.

When I copy the media out of Media/Documentary Series and into Media/TV Shows and scan that library, the series appears.

I ssh’ed into the server and went cd /volume1/Media; ls -l

I can see that both TV Shows and Documentary Series are owned by admin but the permissions are slightly different:

drwxrwxrwx+  20 admin users  4096 Mar  2 03:36 Documentary Series
drwxr-xr-x  171 admin users 12288 Mar  2 03:36 TV Shows

Within both Documentary Series and TV Shows every folder is owned by tarkus (that’s my network user) and there is a mixture of permissions, e.g. in Documentary Series I have

drwxrwxrwx  tarkus users BBC Documentaries
drwxr-xr-x  tarkus users Wild About New Zealand (2013)

The permissions on the Walking the Himalayas folder are
drwxrwxrwx+ 3 tarkus users 4096 Mar 2 03:22 Walking the Himalayas (2015)

and when this series was in the Documentary Series folder the permissions were exactly the same.

So if you can explain why identically configured media in identically configured libraries can be scanned in one and skipped in the other, I will be happier and less confused than I am at the moment :slight_smile:

Cheers
T

Not at all sure what’s going on with those permissions and as I probably know who the Alpha Canine in that department is - we’ll just call him in now:
@ChuckPa

The only thing I have to add at this point is:

Walking The Himalayas doesn’t have a (YEAR) field in the official name:

That means if you add one - it won’t match naturally (so far - that has been our findings). When the President of Permissions shows up - we can explore this mystery as deep as it goes.

While we wait do this:

then remove the show, scan, empty trash, clean bundles, put the show back

and await further instructions. Chuck works incredible magic with logs - give him what he asks for.

OK. I did all that you suggested. Then (assuming that you turned debug logging on because you would want to see a log) I scanned the Documentary Series again. No show.
Downloaded a copy of the logs, looked at the latest Plex.scanner log, and saw that it had seen the Walking the Himalayas folder and skipped it, access denied.

I ssh’ed in to the server again, checked the permissions on the files and parent folders, and everything seemed OK, but I reset them all with chmod so that every one was rwxrwxrwx.
Then I repeated the scan and, hooray, the show appeared.

I’ve also changed the permissions on Documentary Series and Documentary Features so that they match those of TV Series and Movies. I do not know what the little + on the permissions meant, but it looks like it was the cause of my problem. I also wonder if my latest Windows 10 upgrade (in December) was responsible. I was able to add episodes and documentary features when I first restructured the media, but more recent ones have all failed as described in this thread.

Thanks for your help

cheers
T

OK

Just remember to use the exact name TVDB uses if you want natural matches.
If a year field is in the name, use it - if not, don’t.

WOOF WOOF!

:rofl:

Renaming files after they’ve been scanned doesn’t work in most cases.

  1. Move the media out
  2. Scan files
  3. Empty Trash
  4. Clean Bundles
  5. Rename media (if not already renamed)
  6. Move media back
  7. Scan files again if not automatically started.

This is the ‘Plex Dance’

As for figuring out what’s needed / happening permissions wise,
Seeing the ZIP logs is always of help (DEBUG ON, VERBOSE OFF)

The “+” at the end of the permissions list means (meant) that the directory has (had) extended permissions configured via Access Control Lists (ACLs). ACLs can further restrict access beyond the base permissions, or it can loosen them. At the command-line, ACLs are generally managed using getfacl/setfacl. I’m not familiar with DSM, but it sounds like you found how to turn them off via the UI.

image
-----Pennsylpermissionus Caninissus - ChuckPA------

ROTFLMAO! Touche!

As for the DSM permission,

  1. I’m concerned something / someone has been adjusting them manually.
  2. DSM defaults are 000. DSM then uses its database (Control Panel - Shared Folders - Permissions tab) to determine access rights.
  3. If permissions are in disarray, the best solution might be to reset and start fresh with them rather than perpetually chasing one’s tail

Well
 every folder under Media was created in exactly the same way through DSM’s File Station. But the two most recent folders received different permissions. I can’t see when DSM or File Station were last updated but I don’t think either have changed for a while. The more recent change was when I reinstalled Windows 10 on my main PC, but as I just use the Plex web interface I don’t see how that could be responsible.

Edit: I meant that all the “library” folders were created using File Station. When adding a show or feature, I create the folder(s) on the NAS in Windows Explorer, copy the media across, then scan in the Plex library in a browser.

Ok 
 it’s time to get serious.

  1. Verify DEBUG logging enabled, VERBOSE logging disabled.
  2. Recreate the problem (Restart PMS if needed / it helps me as well to see startup)
  3. Wait 30 seconds after it’s all quiescent again
  4. Settings - Server - Troubleshooting - Download Logs
  5. Attach the ZIP file here.

I will see what’s going on.

“Recreate the problem” is the tricky step, because since chmoding all the media folders to 777 in a shell on the NAS I haven’t had any media skipped. While I can change the permissions to something else and generate an access denied error on scan, that strikes me as a bit pointless.

When I have a bit of free time free I’ll create some dummy libraries with folders created in File Station, in Windows Explorer, and in a command shell, and see what happens when I try to add new media to each.

cheers
T

That would be pointless.

If you know the problem is permissions on how they come across from Windows,
I need ask if you are signing into the Synology with the admin account?

If so, then it’s obvious. Linux is very strict about file permissions. Windows is not.
setting all permissions to 777 effectively turns Linux into Windows (effectively disables all permissions checks).

Normally, Synology sets permissions for users such that your normal Synology user (group “users”) and Plex (also in group “users”) can work together and Plex can see the files when you go to Control Panel - Shared Folders - Permissions tab and enable access for user Plex to read them. This is how Synology intended it.

OK. I created the top level library folders (Movies, TV Shows, etc.) in Media using File Station. I log in to DSM as admin so that’s the user which owns folders created in File Station.

If I ssh to the NAS I can see that:

rwxr-xr-x  root   root  Media
rwxrwxrwx+ root   root  Plex
rwxr-xr-x  admin  users Media/Movies
rwxr-xr-x  tarkus users Media/Movies/SomeMovie

If I log in to DSM, open File station, expand Media and look at Properties > Permissions of “Movies” I can see

admin     Allow   Custom
users     Allow   Read
Everyone  Allow   Read

(and if I edit I can see that Custom means read, write but not Delete)

The NAS appears in my Windows Explorer as DISKSTATION and I’m not sure how to display the credentials by which I access it but almost certainly when I first accessed it I had to tell Windows to connect to the NAS as ‘tarkus’. That explains why the individual media files are all on the NAS owned by tarkus not by admin.

Finally, if I log in to DSM and go to Control Panel > Shared Folders, select Media and Edit > Permissions, I see the following

Name    Preview    Group permissions
admin   Customize  Read only
guest   Read only  Read only
marg    Read only  Read only
plex    Read only  Read only
tarkus  Read only  Read only

At this point I’m a bit confused because the permissions on Media and Movies don’t seem to allow user tarkus to write to them, and yet the files are all there, owned by tarkus. And I’ve never had a problem with Movies and TV Shows, only with Documentary Series and Features.
I’m starting to think I must have done something subtly different when I created the documentary library folders, although I’ve no idea what.

Let me explain how that works.

  1. On the Media/Movies, you have hard set permissions 755 (Admin has RW, users group and everything else can read)
  2. On the Media/Movies/SomeMovie user tarkus has been given ownership. Only that username can R/W it

Do you see the rwxrwxrwx+ for the Plex share?
That + sign is how we know ACLs (in Control Panel - Shared Folders - Permissions) are active.

By default, when you create a new shared folder, it looks like this at the shell.

drwxrwxrwx+   4 root  root        4096 Mar  3 13:18 Educational

I’ve given “admin” and “chuck” permission to write to it in the GUI.

That’s all I need do. Now, from Linux (or from windows), anyone signed in as admin or chuck has read/write access to the share.

If you’re wanting more control, Linux will provide that but it’s not really advised on a Synology NAS. It conflicts with their methods to manage permissions.

It’s been our experience to let DSM manage permissions via its GUI. Attempts to over control it never really work out well.