Metadata agents for exported XBMC library

The server is Synology DS411+2 with current updates. PC is Windows 7 Pro.

I got the Movies agent to show up just fine, but the TV Show doesn't.

Anyone have some direction for me please?

EDIT:

Somehow TV Shows finally showed up so this issue is resolved. However, the issue below regarding only 8 shows appearing is still a problem.

Another issue I'm having with TV Shows, and perhaps it is related is that only 8 shows series total are added to the TV Shows section. This is true even after deleting and recreating the section. I've tried Force Refresh, Analyze, etc. but nothing works.

I know that the naming conventions are perfect because I use Ember Media Manager and of course XBMC sees them. Therefore, all the show series that do show up are using same naming conventions as those that do not.

Is there no one that wants to take a shot at helping with this issue?

Make sure you have the correct permissions set for all files and folders. Run the newperms script for your tvshow folder. If the problem persists please create a listing with subdirs of your tvshow folder and a zip of the whole log folder. Put it up on dropbox or a cloud service of your choice and post a link. I'll have a look at it.

Thank you for responding SirG.

Looks like you enable logging in: Plex Media Server -> Settings -> General. But I can't find where the log is saved to?

I also don't know what the newperms script is? Don't think this is a permission issue because I checked windows permissions of missing folders to be sure they matched displayed folders and I can write to all folders.

BTW, in case it matters my collection works perfectly in Ember Media Manager, XBMC Frodo, and Synology DS Video.

The log is saved in the plex directory you specified in the plugin settings.

If you put plex on \mnt\cache\apps\plex it will be in \mnt\cache\apps\plex\Logs

\mnt\cache\apps\plex\Application Support\Plex Media Server\Logs.

To call the newperms script please open a telnet session to your server and enter:

newperms /path/to/your/series/folder

e.g.

newperms /mnt/user/tvshows

It will recursively change the owner and the permissions of all files and folders in this

directory to unraid default values. So be careful you use it on the correct directory.

Using windows to check linux file permissions is not reliable as samba might report

false values. The only way would be to check each file and dir in shell with the

ls -la command in each dir. Tiresome and error prone. So I would really suggest the

running of the newperms script.

Here are the logs. They were actually found at Plex\Library\Application Support\Plex Media Server\Logs

http://www.captainken.us/files/xbmc/plex_logs.zip

Before running the newperms I wanted to be sure that I could navigate to the folder. As you can see in the following telnet session I can get to the parent of "TV Shows" volume1\video, but not to volume1\video v shows.Ā  Any idea what I'm doing wrong? I'm new to this whole Linux thing.

http://www.captainken.us/files/xbmc/plex_telnet.txt

A quick glance at the log shows that com.plexapp.agents.xbmcnfotv.log is mostly empty. So the agent did no scanning it seems. It resides in Logs/PMS Plugin Logs. As you can see with the movie agents com.plexapp.agents.xbmcnfo.log.1 ... other log files will be created if the main log file fills up. This has not happend for you.

Are you sure you selected the agent in Advanced Options when creating your tv library? If you press Refresh TV Shows the logs should fill up. If they don't please recreate the section (maybe create a small test section with only a single series that normally makes the problems) and make sure you select the agent and the logs fill up on scanning.

The second link you provided is broken, but I was able to guess the correct location from the first one. / does refer to the root of your drive.

So /volume1 will work, as volume one is in the root directory. /video will fail as this is not in root. You either have to use

cd /

cd volume1

cd video

or

cd /volume1/video

The dir command you used is good to check the owner and permission status. The first root is the username of the owner, the second root the groupname the owner belongs too. The same goes for admin users and plex users. The drwxrwxrwx are the permissions. d shows its a directory, rwx is readwriteexecute permission. The first triple are the user permissions, second are group and last are world. So ideally if all your files and directories have rwxrwxrwx, plex should not have problems accessing them.

Please forget about the newperms script. I was wrongly assuming you were using plex on unraid (I posted in the unraid thread before reading your post). newperms is an unraid script and not present on your linux install.

What you should do is go to the folder of a series that fails to scrape:

Ā Ā Ā  cd "/volume1/video/TV Shows/Show that fails"

and do

Ā Ā Ā  dir

then look at the permissions for the season folders. They should all be the same.

Then enter the seasons that fail to scrape and do a dir, too. Again permissions should be the same as in all other season folders.

Please report your findings.

Finally got into TV shows using: cd "TV Shows"

Now as you can see I can't get into any series folder:

http://www.captainken.us/files/xbmc/plex_telnet2.txt

Although, the permissions for all series parent folders all looks the same.

I delete the TV Shows section and re-added, but with same issue. Yep, I selected the nfo agent.

Gotta leave for work now, will try to find time to remote in and create a sample test using only one of the series that isn't appearing.

Your cd command is still borked. :)

The command to go to 24 would be:

cd "/volume1/video/tv shows/24"

You have to use quotes, as the "tv shows" folder has a space in it's name. Another way would be to escape the space:

cd /volume1/video/tv\ shows/24

If you are in the tv shows folder already, you would use

cd 24

to got to the 24 folder. cd /24 fails because this means go to the 24 folder in root directory /.

What helps a lot is to use the autocomplete feature. Try entering the first characters of a dir and press the key.

cd /vol will give you cd /volume, without the 1 though.

And you could try to install midnight commander or use the command

mc

as it may already be installed.

I had already tried cd 24 as well as cd lost from the tv shows folder.Ā  Even though I was in tv shows the only way I was finally able to get into "24" was

cd "/volume1/video/tv shows/24"

Here's the telnet session showing permissions for all folders in TV Test.

http://www.captainken.us/files/xbmc/plex_telnet3.txt

Here's a video of deleting the TV shows folder and a few failed attempts at some test folders. I figure this way there is no question of user error.

http://youtu.be/6ksk-M7op14

Here's the logs after all recent tests shown in video.

http://www.captainken.us/files/xbmc/plex_logs2.zip

Shall I assume that none of these types of errors are related?

com.plexapp.systems.log.5
-------------------------
2013-06-04 09:49:28,816 (4000) :  CRITICAL (runtime:706) - Private handlers are no longer supported; couldn't register <bound method StreamService.token_handler of >

com.plexapp.systems.log.4

2013-06-04 08:59:55,716 (4000) : CRITICAL (sandbox:298) - Function named ā€˜Start’ couldn’t be found in the current environment

com.plexapp.systems.log.3

2013-06-04 10:00:31,943 (4000) : CRITICAL (runtime:706) - Private handlers are no longer supported; couldn’t register <bound method StreamService.token_handler of <streamservice.StreamService object at 0xf4408c2c>>

com.plexapp.agents.xbmcnfo.log, log.1,

2013-06-04 09:06:37,240 (4000) : CRITICAL (sandbox:298) - Function named ā€˜Start’ couldn’t be found in the current environment

com.plexapp.agents.xbmcnfo.log.1

2013-06-04 08:59:55,716 (4000) : CRITICAL (sandbox:298) - Function named ā€˜Start’ couldn’t be found in the current environment

com.plexapp.agents.xbmcnfo.log.2

2013-06-04 08:52:58,828 (4000) : CRITICAL (sandbox:298) - Function named ā€˜Start’ couldn’t be found in the current environment

Directory and file names on linux are case sensitive. So it was my mistake to tell you to use cd ā€œ/volume1/video/tv shows/24ā€. Correct is:

cd ā€œ/volume1/video/TV Shows/24ā€

You trying to change to lost fails because the folder is propably named Lost.

cd ā€œ/volume1/video/TV Shows/Lostā€

would be better.


The video shows you are doing everything correctly. The permissions for the test folder seem to be correct. So no problem there. And now the bugger. Agent logs this time show a perfectly working scrape. See .log and .log.1. All eps of your test series are correctly recognized. Why they don’t show in plex, I have no idea. .log.2 in the latter parts shows the scanning of the show Seinfeld. Goes without problems up to season 8 without problems.


The errors you list above should not be related. Afaik I have the same ones in my system. I’ll check it later to be sure.


Your video shows that the thetvdb and local media agent also don’t scrape anything, so at least the problem is not related to the agent itself. It seems to be a more general problem with you plex install.


Could you please try another browser and please post a permission listing of your plex directory and subdirs?

Stumped at how to get the folder listing with attributes? This command gives everything except attributes. I'm assuming because I'm trying to use DOS.

dir "\\SERVER2\Plex" /a /s > C:\Temp\Plex.txt
pause

I checked those test sections with IE9 and FF just now and the Common Law show is now mysteriously there.

Using IE9 I then deleted them, and added the entire live TV Shows folder containing all shows. Same problem where only the same 11 of 47 shows are listed.

Yes. Please forget about DOS. You will have to learn a rudimentary set of linux commands or you will run into trouble really fast. While linux has gotten a lot better in doing things the gui way, there is still a lot of stuff that forces the user to use the shell.

That said you, are not able to read the linux permissions through a samba share. Windows and DOS are not made to use them, so samba hides them, making Windows and DOS think they are talking to a windows based file server. You have to work in the shell on your linux server to get the correct information.

The command is:

ls -alR "/path/to/plex" > "/path/to/file.txt"

Remember to use / instead of \ on linux as in linux the \ is an escape character used to mask special chars like spaces, brackets... To avoid escaping characters use quotes around your paths. And remember that everything is case sensitive!

Please use the same command with different path and file to create a full listing of your tv shows folder.

Please add a third file telling me which are the 11 recognized shows.

Please check how much space is left on the drive your plex directory is located on.

df

will propably show you this.

It's a very mysterious problem you have there. I'm very sorry that I have to poke around in the dark, making you do a lot of things.

No need to apologize, I'm just extremely grateful for your diligent assistance! Oh and the Linux lessons!

Plex.txt is the Plex folder listing. I did cd "/volume1/Plex" and ran your command from there. Even though it seemed to populate the txt with everything, I got these errors at the end.

Server2> ls -alR > "Plex.txt"
ls: can't open './Library/Application Support/Plex Media Server/Plug-ins/HTbackd
rops.bundle/Contents': Permission denied
ls: can't open './Library/Application Support/Plex Media Server/Plug-ins/OpenSub
titles.bundle/Contents': Permission denied
ls: can't open './Library/Application Support/Plex Media Server/Plug-ins/Persona
lMedia.bundle/Contents': Permission denied
ls: can't open './Library/Application Support/Plex Media Server/Plug-ins/WebMana
ger.bundle/Contents': Permission denied
ls: can't open './Library/Application Support/Plex Media Server/Plug-ins/Wikiped
ia.bundle/Contents': Permission denied

Then I did cd "/volume1/video/TV Shows" and created the "TV Shows.txt, which populated the file, but gave me these errors.

Server2> cd "/volume1/video/TV Shows"10:36 AM 6/7/201310:36 AM 6/7/2013
Server2> ls -alR > "TV Shows.txt"
ls: can't open './24': Permission denied
ls: can't open './Adventures of Superman': Permission denied
ls: can't open './Alias': Permission denied
ls: can't open './Alias Smith and Jones': Permission denied
ls: can't open './Ally McBeal': Permission denied
ls: can't open './Army Wives (2007)': Permission denied
ls: can't open './Arrow (2012)': Permission denied
ls: can't open './Blue Bloods': Permission denied
ls: can't open './Boston Legal': Permission denied
ls: can't open './Casino Royale (1954)': Permission denied
ls: can't open './Castle (2009)': Permission denied
ls: can't open './Common Law 2012': Permission denied
ls: can't open './Covert Affairs': Permission denied
ls: can't open './Dancing with the Stars': Permission denied
ls: can't open './Elementary': Permission denied
ls: can't open './Fairly Legal': Permission denied
ls: can't open './Hawaii Five-0': Permission denied
ls: can't open './Hunted (2012)': Permission denied
ls: can't open './Law & Order SVU': Permission denied
ls: can't open './Leverage': Permission denied
ls: can't open './Lost in Space': Permission denied
ls: can't open './Matt Houston': Permission denied
ls: can't open './NCIS': Permission denied
ls: can't open './Necessary Roughness': Permission denied
ls: can't open './Nikita': Permission denied
ls: can't open './Pan Am': Permission denied
ls: can't open './Prison Break': Permission denied
ls: can't open './Royal Pains': Permission denied
ls: can't open './Scandal': Permission denied
ls: can't open './Shatners Raw Nerve': Permission denied
ls: can't open './Strike Back (2010)': Permission denied
ls: can't open './Suits': Permission denied
ls: can't open './The Avengers': Permission denied
ls: can't open './The Real McCoys': Permission denied
ls: can't open './White Collar': Permission denied
ls: can't open './Wonder Woman (2011)': Permission denied
Server2>

Here's the drive space results.

Server2> df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md0               2451064    469652   1879012  20% /
/tmp                    507996      5008    502988   1% /tmp
/dev/vg1000/lv       1918192104 1601459340 316630364  83% /volume1
/dev/vg1001/lv       2879606320 924133104 1955370816  32% /volume2
Server2>

Ā The recognized shows are:

  • The Client List
  • Defiance
  • The Hire
  • House of Lies
  • Last resort
  • Lost
  • Missing (2012)
  • Orphan Black
  • The Phantom
  • Seinfeld
  • Wild Boys

Here's the Plex and TV Shows folder listings.

http://www.captainken.us/files/xbmc/plex_and_tvshows.zip

Okay. This again indicates a permission problem. If you look into the "TV Shows.txt" you clearly see, that all series it is able to access and list the contents are those, that are correctly scanned and recognized by plex.

The errors you got when creating the "TV Shows.txt" should be for the directories of the series, that are not recognized, correct?

Now you first need to change to the root account. Please enter:

su

This is short for super user and will propably ask you to enter the root password (I hope you know it.) and will then switch the account. If it doesn't work (some distributions block this command for security reasons.) we'll have to use sudo.

This is another command, that has to be put before every command that should be executed with elevated privileges.

Is your linux server directly connected to the internet? Or is it behind a router firewall with only a few forwarded ports open? In the first case we have to be careful, in the last case we can continue with the following commands.

Let's try to change the permissions. Please go to the "TV Shows" folder and type either:

chmod -R 777 *

or

sudo chmod -R 777 *

This should change your permission for all files in all subdirs to 777 which is equal to rwxrwxrwx. All users will have full read, write and execute access. Now Plex should be able to scan everything. Please give it a try.

The access errors from the plex directory are somewhat dubious, too. But I think we can ignore them for now.Ā 

I actually had to follow this guide to get into the root account as su or sudo didn't work.

http://forum.synology.com/wiki/index.php/Enabling_the_Command_Line_Interface

So it worked!!!!!!!!!

Here's the new permissions log.

http://www.captainken.us/files/xbmc/plex_tv_shows-with-permissions_fixed.zip

Isn't it strange that I could move, delete, create, and edit files in all those folders with other programs such as Windows 7 Explorer and Ember Media Manager, but Plex was having issues?

I don't own a synology myself, so I gave you the commands that normally would work on linux based systems. I'm glad that you got it working for yourself when they failed. :)

The permissions log looks a lot nicer now. But please be aware, that when you place new shows in your folder you might run into permissions trouble for those shows again. You know the commands to find and fix it now.

These problems are indeed strange, when you come from a windows world (through newer Windows Versions allow for an equally fine grained access control to files based on users, groups and permissions). If you are using Windows Explorer you are talking to your syno through samba. Samba propably is setup in a way, that you can access nearly/all files/folders without problems and hides what is really going on on your box.

Samba uses a specific user with predefined permissions (I don't know how it is setup on your box.) to store your files on the syno. If you download something through a service on the box (sabnzbd, transmission, ...) it may be saved using a different user and permissions. Now plex comes along using again a different user and may therefore be blocked from accessing the files, if the permission aren't set in a way that will allow it. Setting them all to 777 is an easy solution, though from a security standpoint it may be dangerous. But this clearly is out of scope for this thread. Please google around if you need more info.

Thank you SirG for your awesome assistance!!

I'm glad I could help you. :)