Changing the Section Icons in Plex is something that’s come up a few times, from multiple people, and until now, the best answer of how to do it was to use an old version of the Media Manager, then click the non-intuitive button, then change the artwork there. Note: Only works when the server is on Windows? Or maybe only if you’re client is on OSX?
Total BS.
So, I thought to myself: it has to be somewhere that’s common to the different media servers (they can’t be that different behind the scenes), and now with the API, it should be kind of straightforward (we hope).
Short answer; I followed the trail, changed something that looked like it could be it, and tested it:
SUCCESS!
If you want the geeky stuff, it’s at the bottom where it can be safely ignored if you’re not in to that sort of thing.
So how do we do this right every time?
If you have waded through databases before, you’ll be much more at home. If not; this may be tricky, but as long as you back up the files when mentioned, you’ll find the changes made without too much sweat.
Step 1: Shut down Plex Media Server so that we don’t damage anything
- On Ubuntu, this is done with “sudo stop plexmediaserver”
Step 2: Find the file “com.plexapp.plugins.library.db”
- Check the Wiki for the location on the “Plex Media Server” folder on your server.
- Once there, go in to “Plug-in Support” > “Databases”
- You should now see “com.plexapp.plugins.library.db”
Step 3: Make the backup
- Normally, I do this by simply making a duplicate (right-click > Duplicate, or Copy, then Paste in the same location renaming this new file to “com.plexapp.plugins.library.db.ORIGIONAL”)
Step 4: Open the file in an SQLite Editor
- I’ve not found a fantastic option for this, however, we can get by with using the Firefox plugin “SQLite Manager” by lazierthanthou (Install through Firefox, then use the Tools menu to select “SQLite Manager”)
- Note: When opening the db file, you may have to Choose “All files” under the “Format” menu for SQLite Manager to un-grey the “com.plexapp.plugins.library.db” file.
Step 5: Edit the URLs
- In SQLite Manager, make sure you’re on the “Browse & Search” tab, then select “library_sections” on the left.
- On the main part of the window, you should now see your library sections.
- You can double-click the line for any Library Section, and put in the URL of the icon you want to use (I’m going to stick with public URLs for the moment).
- You can, for example, use http://upload.wikimedia.org/wikipedia/en/6/60/TV-G_white_icon.png ( Public Domain, linked from Wikipedia ).
Update: As pointed out in the comments by Philippe, ‘//’ is considered an escape character, so we can use local files by using the following format: file:////Volumes/Work/myfile.png
I have not tested this to make sure it works outside the network, so please report back with your results! - When you’ve filled everything in the way you want, Press “OK”, then confirm on the next screen.
- Note: When you confirm, you have “Saved” the file
Step 6: Test
- Start Plex Media Server again, and fire up the web client.
- Jump up and down, laughing, crying, dancing! (Or facepalm if a minor spelling error was made and you have to go back)
- Note: If you want to check any other devices; reboot or clear the cache.
- Second Note: I did not see the results yet on iOS (iPad or iPhone).
Step 7 (Optional): Spend hours obsessing about the prefect icon scheme before thinking about what rating backgrounds are the best.
- Note: I may use this background for PG-13: http://boingboing.net/2010/08/12/fun-with-mpaa-rating.html : RATED PG-13 FOR NON-STOP NINJA ACTION.
How I did it (aka the Geeky stuff):
Following a hint on the forums by PJE, we learned that plexmediaserver has a “thumb=” variable, and that it should take http:// and file:// URLs.
Excellent; how do we find the setting for this?
Digital investigation tactics: follow the leads.
Since PJE mentioned it under the ‘/library/sections list’, I pulled up the server, and plugged in the section: http://simba.local:32400/library/sections .
From this, we get the XML list of sections:
<Directory art="/:/resources/movie-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/movie.png" key="6" type="movie" title="Movies - G Rated" agent="com.plexapp.agents.imdb" scanner="Plex Movie Scanner" language="en" uuid="33d83f638.............e7fb21e0fb" updatedAt="1357340005" createdAt="1333574083">
<Location path="/media/Shared/Video/Movies, Cartoons, and TV - G rated/Keep/Movies"/>
</Directory>
and I immediately saw something I could search for: uuid.
Went to the server terminal, then in to the plexmediaserver “Library” folder (Find the locations here), and used an old standby: the Grep command.
grep -Rs 33d83f63822.......7fb21e0fb ./Application\ Support/*
(R for recursive, s to suppress error messages)
Aaaaaand: com.plexapp.plugins.library.db was the only result: Success!
Now what?
Definitely stop the server from running while we fiddle.
A quick glance showed that this file was an SQLite database, and when opening it, the “library_sections” table jumped out. Immediately backed up the file, then a quick change to user_thumb_url and user_art_url gave me something to test.
Started the server again, and the change immediately showed up in the Web client: “user_thumb_url” showed the little icon like we want, and “user_art_url” showed up as the background art for that section: nice bonus!
Restarted the Roku, tested there: Icon showed up perfectly.
Extra bonus for the extra lazy:
Here are the URLs for the icons that I’m using:
https://dl.dropbox.com/u/484200/Ratings/MovieG.pngNote: The images these link to will change as we keep looking for just the right icons and backgrounds for us.
And, here are some extras that others have liked:
http://community.mediabrowser.tv/permalinks/1436/xzener-s-fanart-collection
Dude, this is genius. I had some success with your method. Very happy with the results via Roku. For whatever reason, the Android client does not show the chosen icons. Not sure if there is anything that can be done to help it along or not.
In any case, thought I would report that, and say THANKS!
Thanks for posting!
I too wanted to thank you for this, works great.
Do you know if there is a way to get down one more level and change those icons as well? I would like to have my movies which I have 4 sections, and TV Shows, which I have 6 sections, under their own main folders, instead of having all 10 at the main level.
Glad you got some use out of it, Mike.
As for what you’re trying to accomplish; there’s no way that I know of to create a “sub-section” with it’s own icon.
To get that functionality without icons, you may want to look in to the ‘collections’ feature ( forum topic here: http://forums.plexapp.com/index.php/topic/52040-plexweb-and-editing-collections/ ).
That way, you add all the folders in to one Section for movies and one for TV, then organize them in to collections. Every client I have interacted with supports collections, including the Roku.
I was able to locate my Collections in the “tags” section, as well. They’re marked as “tag_type” 2, and I was able to change their icon in the way you’ve outlined.
Excellent; thank you for the addition!
I don’t have anything show up under library sections except the field name line. Why is that? I have several genres and wanted to change the icons for them. TY for any help.
An interesting question;
Taking a look at the database file mentioned in the steps above, and found that Genres are listed in the “tags” section (the name of the Genre is the ‘tag’), and that there is a column for “user_thumb_url”.
Since some of the Plex clients interpret this differently, try making a backup, and putting an image URL in for the genre to see if it works for you.
On a Windows system the live database is in
C:\Users\owner\AppData\Local\Plex Media Server\Plug-in Support\Databases.
Took me a while to find it.
Worked like a charm… not sure why Plex has hidden this functionality till now but thanks for sharing 😀
[…] movie clapboard, dark television screen, LP disc for albums). Never fear, a hack is near! Thanks to this page, I found yet another clumsy multi-step kludge, but I’ve changed the icons for our Disney, […]
Just great! Works like a charm with any icon on the web.
I tried a local .png but unfortunately I cannot get that to work. E.g C:\Logos\content18.png doesn’t work, I also tried media://SectionThumbs/Music.png for icons stored in the media SectionThumbsdir of Plex for example.
Any reason for this?
To be honest, local files wasn’t a priority for me personally.
It makes sense that referencing by drive letter wouldn’t work, but I would have thought that your second solution would.
Keep in mind also that the section icon feature definitely has have some dirty coding; it doesn’t work the way one would expect, and doesn’t work across certain different setups.
Local files work just fine, which I’ve now tested under Win7pro_x64, but it should work the same on any system supporting normal samba shares as “file://” (or “file:\\”). For my test I simply stored some icons in a shared folder on the same computer where PMS runs, and edited the database file as documented above, but using path strings like “file:\\Ra4\d\Art\Plex Icons\Documentaries.png”, where “\\Ra4” is the LAN name of that computer, where the icons are stored in “D:\Art\Plex Icons\”. It should work equally well for pictures stored on other local computers, as long as the account under which PMS is running has read access rights to the shared folder contents.
Like Linda, I’m not seeing anything in the library sections; I tried in library, tags, and everywhere, in fact. I did a search for all the DBs on the drive, and found three. Nothing showed up in any of them. When I open the :32400/library/sections, it has the same sort of information you found, but I’m not finding anything I can edit in the files. I tried using grep but it didn’t take.
FWIW, this is the ArchLinux ARM install of Plex, so it may not work at all, but I thought it was worth trying.
Thanks for the guide and for any help!
Preliminary searching leads me to believe that on ArchLinux, the database files are installed by default at “/opt/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases”.
As for editing, these are not standard text files, so grep will do no good.
You may have to copy the database file to another computer to make the change with the SQLite software mentioned above (transferring it back afterwards, of course)
Let us know how it works out.
Hi Josh, thanks for the quick help. I actually don’t have ANYTHING in the /opt/ folder. What you found sounds like what I have in /library/ [/library/Application Support/Plex Media Server/Plug-In Support/Databases]. There IS a com.plexapp.plugins.library.db file there, but I’ve tried opening it via network and locally and found nothing I can tinker with inside. Most of the entries have no records (there are index fields, including the user_thumb_url, but no data in them).
So I have successfully changed a icon for a library section ie: movies, TV, but I still want to so one of the folder inside the movie section.
It sounds like I can do that with what you have laid out but I;m not finding a way to do it. Any help or am I just going to have to make all my folders into libraries instead of subfolders.
I do have collections setup but yet again its the default icon for each collection.
I may dig in to this later if we go forward in making some Plex power tools, but as far as the folders are concerned, nothing has really stuck out that says that it’s possible to have custom images.
Can’t get local png to display properly!! 😦
There has not been a consistent way to make local images work, so you’re better off uploading them somewhere; Dropbox, a web server, github, or even a service like imgur.
I noticed that if I entered a URL for an image, then removed it it went back to its original picture. However if I then entered a second URL, it goes back to the first one, no matter what I put in the field. Is there anyway to fix this? Some cached file that needs to be deleted perhaps?
Are you making sure that you are stopping Plex when replacing the icon the second time?
What happens if you try to change a section icon that won’t change, and also at the same time change a different section icon for the first time?
I had this same issue with trying to change the icon after I did a test one to see if it worked. I had stopped the Plex replaced the URL and still the same one keeps coming back. If I remove it, it goes back to the defaults for Plex.
I have the same problem. Did you end up finding out what caused it?
If you add a movie into the section where you changed the icon, it will update. Probably just scanning for changes would do the trick as well.
Philippe mentioned in another comment that it was “important to update the updated_at field so the new files will be loaded when PMS is re-started.”
Anyone who’s having this same problem; let us know if that works for you!
Thank you very much. Had the same problem. But updating the update_at field worked for me.
By the way. You are editing a database which is made for edition “on the fly”. So you do not have to shutdown and reboot plex everytime as long as you only do such “simple” changes. Worked fine to me.
Also, I found a great repository for icons in case anyone would like to use them. http://repository-butchabay.googlecode.com/svn/branches/eden/skin.cirrus.extended.v2/extras/moviegenres/
Hi, great post thanks, just what i was looking for!.
I got local file path to work using file:// also. I hosted the image in the root of the section directory, and used its full path (prefixed by file://) in the db field. It looks like plex auto-fixes the path when serving up the xml see output from http://%5Bserver_ip%5D:32400/library/sections. For me the local path was served as something like thumb=”/library/sections/5/thumb/1380800717″ which works from my roku downstairs and other computers on network, should also work remote as it seems to be part of the plex web server path now.
Thanks for adding your experience; this question keeps coming up and now we have some insight as to how it can work going forward.
What OS is your server, and have you tested this trick on other server operating systems?
I am running Win Xp Sp3 – plex 0.9.8.175.
On further thought it makes sense they translate asset paths like this, since they are already hosting their own web server process. I also saw another URL that looks interesting art=”/:/resources/movie-fanart.jpg” which looks like internally the server will translate to installdir\Plex Media Server\Resources\Graphics\ not sure if that can be used in the database, not ideal but another possibility.
I might write a small tool to enumerate the sections in the db, then walk the folder structure looking for something folder_icon.jpg and updating the record if it exists just to automate the task.
Thanks to this great post, I could use my own thumbnails on an OSX based PMS.
For local files one need to double ‘//’ into ‘////’as ‘//’ is considered an escape character:
user_thumb_url = file:////Volumes/Work/myfile.png will do just fine.
However it is important to update the updated_at field so the new files will be loaded whe PMS is re-started.
This is excellent, I’ve updated the main article; thank you.
I wasn’t quite sure what dzzie’s post above meant by the root of the section directory. I could not get it to work with using file:// – even after trying different locations. However, placing my files in the installdir\Plex Media Server\Resources\Graphics\ folder as was suggested in the second post, and setting my URL to /:/resources/Action.png (as an example) worked like a charm.
In fact, you’ll notice in my example that I used an Action.png image. This was because you can easily customize any folder by editing “tags” on the left (instead of “library_sections”). It’s there towards the bottom of the Tables. When you load it up, it’s a database of every single folder, including Actors, Genres and Collections (although I don’t see anything for Year or Decade). I suggest clicking on the top of the “tag” column to put them alphabetically, and then you can edit the ones you want to customize.
Thanks. This was an awesome resource for me.
Art; thanks for your workaround of using ‘/:/’ for local files.
Another user in the comments, Philippe, mentioned that ‘file://’ doesn’t work, however, ‘file:////’ does, so you may want to test that out to see if there’s a difference and if so; which one fits your setup better.
This has worked for me, except that for my home movie section no icon shows up, even though I use the same URL (as suggested by Nathan) for the Home Movies.png file that is used for the TV and Movies sections images (which worked great). I changed the update field to the current date/time, but the image field for the Home Movies remains blank after I replace the db file and restarting the PMS. I am using OSX mountain lion. Any help appreciated.
Can someone confirm if this still works? I changed my icons around Christmas, following this guide and everything worked great.
I added a new standup section to my library last night and decided to change the icon for it but when I add the path to my icon Plex reports the database is corrupt.
Luckily I have my backup but I’ve now noticed that even if I change the location of the icon for one of my other sections, Plex doesn’t seem to notice, it still shows the previous custom icon I had used.
I’m wondering if one of the last updates has messed this up
It is working for me still.
If it’s of any help to anyone, on Windows I used file:///C:/Users/Path/To/Icon/Exercise%20Videos.png to get the icons to show up finally. I’m not certain you need encoded space (%20), but I through it in there just in case.
Can anyone confirm if this works on Android and IOS? I am running PMS on a Windows pc…
I can confirm it to be working on Android when using custom section icons, but not on IOS!
Using “file://localhost/://.png” on a windows based PMS.
Works like a charm on Roku, not on iPad or iPhone though. Anybody gotten those to work yet? Thanks!
@Stu: if you still get the old icon even after changing it, try to scan the section (Update library button in top right) from the plex web app. That worked for me…