Take a Deep
Breath
and
Count to Four
by Arik Devens
Dec 9th, 2021

Getting Custom Posters out of Plex

I recently decided to change the location of the content in my Plex libraries. For the last few years they've been kept in Google Drive, and mounted on my Plex server Mac using rclone and macFUSE. That's worked reasonably well, but it's certainly not perfect. I've hit rate limits, difficulties with non-ASCII characters, and folders that couldn't be deleted. Also, I've been paying for an unlimited plan, and Google has recently decided it's less interested in selling me one. Ultimately, they just raised the price by almost 2x, but they clearly aren't as committed as I need them to be. It's time to move on.

As I've been moving the content, I've run into a problem. Plex has an article on their website of how to do this kind of move, but in practice it's a bit flaky. Specifically, the library scanner isn't always great at figuring out that the moved files are actually duplicates. This means you might have to recreate any custom metadata, like posters, for the new items. That's a problem for me, because I've been doing something I shouldn't have. I've been using the Plex web app to store the posters, which "uploads" them to an internal database, where they dissapear into the ether. The problem, is that for many of the items that aren't being seen as duplicates, I don't have a way to re-download that original artwork.

That's what led me to try and figure out how to get my artwork back out of the Plex vortex. The solution I came up with was complicated enough that I figured I should document it here. Now that I have the posters, I won't be storing them this way again either. Instead I'm putting them where they belong, in the folders with the original content. From there Plex will happily find and use them.

If you're stuck like I was, here's what you can do. First you need to find the directory where Plex is storing the metadata, on the computer you use to host your Plex install. If that computer is a Mac, it will be in ~Library/Application Support/Plex Media Server/Metadata. What you want to do, is to cd into that directory in a terminal, and run this command.

find . -type f -path "*Uploads/posters*" ! -name "*com.*" ! -name "*tv.plex*" -exec cp {} ~/Downloads \;

What that's doing is finding all the files in the directory that have a path that includes Uploads/posters, which means they were custom. It ignores posters coming from com. and tv.plex, which are from metadata agents. Then it takes the files it finds and copies them to the Downloads directory. You'll end up with something like this.

00050a40e0277edd23787448ecea6f69508f2444 8020371bab6b0af52b95f1a8e4e15c1a59d33b42
002925311db7753c36bc9e8c1ad5535a38ce2001 807f3f900d7b4eb45350a1cb96851f7cf72a05cc
003f2a9532ad3a7a37fb5909eee778bd2d45bfa0 80f6a42bf56a25f08d1b3cf1d322033684dbe9b3
00830928241dda2c4b84877a9653ba4d860413a7 810bb89c56cde83e74f18b4eaa85d4cf475a1e31
008f3c57cddc40c6c92eb46e699ad9211e426ab4 8110133ed3d9903f4ae61fc19190d75c8607b42c
0091777970a6addce7f724aea10094628cf3a615 816e256f8ddf242352d181013a36ccf2a937818a
00a3938344dbda196bafffcdaf7bf2ac595af8cc 81ac77e5414ff2e346389f019ce39daaedb446ab

Each of those is a poster you uploaded, named with a UUID, still in the image format you saved them in. Assuming jpg you can use the Finder to rename them and add .jpg to every file, and you're done. You just need to look through them, find the ones you want back, and rename them to something less UUIDy. Now to never store them like this again!