My movie files contain working embedded movie posters but they dont show up in plex libraries. Plex displays some covers fetched from the internet, but disregards any embedded images.
There are critical errors in com.plexapp.agents.localmedia.log: CRITICAL (sandbox:298) - Function named 'Start' couldn't be found in the current environment
CRITICAL (agentkit:1067) - Exception in the update function of agent named 'Local Media Assets (Movies)', called with guid 'local://79' (most recent call last): File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, in _update agent.update(obj, media, lang, **kwargs) File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/LocalMedia.bundle/Contents/Code/__init__.py", line 59, in update localmedia.findSubtitles(part) File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/LocalMedia.bundle/Contents/Code/localmedia.py", line 265, in findSubtitles if os.path.isfile(os.path.join(path, file_path_listing)) and not RE_METAFILES.search(file_path_listing): File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-08b2c10/lib/python2.7/genericpath.py", line 29, in isfile UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 47: ordinal not in range(128)
But an update still wont load the local images and the error is still showing up.
EDIT: The problem is the german Umlaute. If i scan a Folder without them its working like expected. I have
export LC_ALL=“de_DE.UTF-8”
export LANG=“de_DE.UTF-8”
in my /etc/init.d/plexmediaserver. What else could i do?
@zzk_admin said:
EDIT: The problem is the german Umlaute. If i scan a Folder without them its working like expected. I have
export LC_ALL=“de_DE.UTF-8”
export LANG=“de_DE.UTF-8”
in my /etc/init.d/plexmediaserver. What else could i do?
Ah, that issue. Yes, unfortunately this plagues many NAS and Linux users. Any special characters in path and file names will cause an exception in the LMA agent, causing any local assets to be ignored.
@ChuckPa do you have an idea about the proper codepage settings?
I am not well versed in Linux, but I think you investigated this issue in Linux before.
OK here follows a highly inofficial fix, which may cause your computer to spontaneously catch fire, so tread carefully:
quit Plex server
go to /usr/lib/plexmediaserver/Resources/Plug-ins-???????/LocalMedia.bundle/Contents
in there, edit first the Info.plist file and insert the following
<key>PlexPluginDevMode</key>
<string>1</string>
then edit the Code/helpers.py (create a backup first!)
Use an editor which is aware of proper indenting for Python. If your working platform is Windows, I recommend ‘notepad++’.
and replace the def unicodize(s): (lines 20-30)
with this:
These changes are overwritten when you install a new server release.
Let’s hope thse changes are officially confirmed soon and get into an official release.
start Plex Media Server
see if it changes anything for you, especially if the error messages continue or not
Thank you for the code - I edited both files and started plex, but it would not fix the problem. Also i noticed that some files with Umlauts in their name will show up but others wont - even some without Umlauts in the title (maybe there are Umlauts in the meta description?)
Error still is:
2016-09-15 10:13:51,740 (7fc45a7fc700) : CRITICAL (agentkit:1067) - Exception in the update function of agent named 'Local Media Assets (Movies)', called with guid 'local://76' (most recent call last): File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, in _update agent.update(obj, media, lang, **kwargs) File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/LocalMedia.bundle/Contents/Code/__init__.py", line 59, in update localmedia.findSubtitles(part) File "/usr/lib/plexmediaserver/Resources/Plug-ins-24ffd60/LocalMedia.bundle/Contents/Code/localmedia.py", line 265, in findSubtitles if os.path.isfile(os.path.join(path, file_path_listing)) and not RE_METAFILES.search(file_path_listing): File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-08b2c10/lib/python2.7/genericpath.py", line 29, in isfile UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 35: ordinal not in range(128)
Heres the File that causes the error
INFO (__init__:54) - Error finding media for movie Tom & Jerry Collection 1: 'ascii' codec can't encode character u'\xf6' in position 31: ordinal not in range(128)
To add some complexity
If i put this movie in a directory and index that folder as a library the cover is shown correct.
Thanks for your answer. Sorry for sending the file via pm, but it was a privacy concern.
I have cleaned all ( x ) from the files. Now most movies have images, but there are still some left without. I am also not shure if the images are fetched locally or from the internet.
To enlight my pickieness about that:
The library contained a file called “unplugged - the corrs.mp4” - a live concert cut. The scanner fetched metadata for a movie called “porn unplugged” though - a porn movie with explicit cover. The library in question is available to small children and something like that cant be happening again. Thats why i like to make shure covers get read locally.
The online databases do rarely deliver correct metadata for videos which are not ‘Movies’. The Corrs Unplugged DVD you probably need to put into a Home Video library and put in some metadata yourself.
I use a separate library for live concert content, which by default doesn’t even try to fetch metadata from online.
You may want to read about local movie extras.
I’d also remove all the other content which is not ‘movies’.
Those comedy recording have the same problems. There are rarely metadata for these types of videos available. So I’d store them separately and treat them like explained above for the concert videos.
Ok, I understand the logic behind sorting these files and naming them right but in my assumtion it seems to be possible to also get all the metadata from the files themselves? In my first screenshot you can see that i put Local Media Assets up front. I did this with all the agents. So whatever i configure in my library the agents should prefer the local metadata?
If i use Home Videos as a library only screenshots from the movies are shown.
@zzk_admin said:
In my first screenshot you can see that i put Local Media Assets up front. I did this with all the agents. So whatever i configure in my library the agents should prefer the local metadata?
It will prefer them, but: the number of embedded metadata tags Plex reads is limited.
And, more crucial, Plex only reads embedded metadata from mp4/m4v files.
If i use Home Videos as a library only screenshots from the movies are shown.
If you edit your library, go the the ‘Advanced’ tab and change the Scanner to ‘Plex Movie Scanner’ but leave the Agent as ‘Personal Media’ you get exactly what you need for these “special cases” or for use with embedded metadata only.
As soon as the Scanner is set to ‘Plex Movie Scanner’, this library supports again all the local extras described here.
@zzk_admin I wrote some changes to the LMA, to make it better cope with extended characters, aka the fix that Otto gave you, but it seems like you stumbled over yet a special case, that needs to be worked on
As such, and since neither of us Ninja’s can replicate, I was wondering if you would be willing to work with me on this?
It’s going to take a lot of work from both you and me, and most done via PM’s, since we’ll be swapping code, that is not intended for lurkers to put on their PMS installations, before they get the okay stamp by Plex.
Your media will not be harmed, and neither your database, since we’ll simply take a backup of it before starting on this, and doing so req. that we take your PMS offline briefly though, while doing so, so are you up for the task?
And FUI, LMA did detect your media okay, but is now, with my code change, failing with detection of subs, so that’s the part we need to look into
By OttoKerner suggestion I am following this post and I can help with logs or anything you need to debug the problem.
I use Ubuntu 16.04 LTS and PMS Version 1.1.4.2757.
I have set the permission correctly. I changed the user Plex use to run to my own user so permissions are not a problem and all the media is being correctly identified. Agents are configured for Local Media Assets as the first in the list.
I have local srt files with the same name as the TVShow or Movie and plex does not display the local subtitles.
Example:
├── Game of Thrones
│ ├── Season 5
│ │ ├── Game.of.Thrones.S05E03.HDTV.x264-KILLERS.mp4
│ │ ├── Game.of.Thrones.S05E03.HDTV.x264-KILLERS.srt
│ └── Season 6
│ ├── Game.of.Thrones.S06E01.HDTV.x264-FLEET.mkv
│ ├── Game.of.Thrones.S06E01.HDTV.x264-FLEET.srt
│ ├── Game.of.Thrones.S06E02.HDTV.x264-FLEET.mkv
│ ├── Game.of.Thrones.S06E02.HDTV.x264-FLEET.srt
I have attached a screenshot from Plex where you can see GoTS06E01 where subtitles state NONE and there is no way to change that!
The only subtitles I can see are the ones being fetch from Opensubtitles agent. everything that is local is not displayed