<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&#038;display=optional"> Continuing the Conversation | Plex

Plex Blog

August 28, 2010

Continuing the Conversation

So I’d like to hear a bit more about these scanners. That wasn’t a question, but sure. They are little snippets of Python code that are invoked by the Plex Media Server when scanning a library section. They are passed a list of files, and a list of subdirectories, and return a list of media objects. They look at the list of files, convert ones they recognize into media objects, and are also allowed to remove any subdirectories they don’t want to recurse into. Also, they can be “stacked” or “pipelined”, so the Movie scanner first calls the “Video Files” scanner to eliminate all the non-video files, and ends by calling the “Stack” scanner which stacks those pesky CD1/CD2 files, for example. Modular, extensible, and flexible.

That meant absolutely nothing to me, can you tell me something cool from the end-user perspective? Sure. As written, the TV scanner and the Movie scanner both take advantage of each other so that I can actually add the same “Incoming” directory to both my Movie and TV library sections, and they each pick out just the media that they’re supposed to. It’s not perfect, but it works pretty well.

Wait, but what happens when I move my media from my Incoming directory into its final resting place? Alexandria uses “turbo hashes” to keep track of files, so it’ll detect the fact that you moved the file, and you really won’t notice, it’ll just work.

OK, riddle me this! What if I have media on an external drive, unplug it, and then scan. Surely all hell will break loose and the Media Server will crash, choke, or delete my content, right? Right?! You mistake us for amateurs, kid. We just note that the location is offline and don’t whack anything.

So I have to keep updating my library manually? Only if you want to. You can update each section manually, hit a URL (if you’re the scripting type), have the library update periodically (every hour, say), or even enable “fs_events”, which auto-magically scans your library when something changes. Doesn’t work perfectly yet, but it’s pretty magical when it does.

I made a movie section, watched some stuff, rated some stuff, and then I accidentally deleted my section, or maybe I didn’t have it configured right, or maybe I just felt like recreating and scanning from scratch. Somehow, all my view status, ratings, and even position in the file wasn’t lost. Is this magic? Yes.

But I even renamed some movies in the process. And moved them elsewhere. How the @#$%@ does that work? Magic.

I’m really not sold on this centralized server thing. A bunch of my movies are located on my “server” machine, but I also have a bunch on the machine where I have Plex. Isn’t that horrible inefficient? As long as the paths are the same on both machines, Plex will simply use the local path for media when it’s available. We call this “optimal media routing”. (It’s actually the only way that VIDEO_TS movies work now, but that’s an aside.)

But I’m a UNIX hacker and I have Chinese food in my beard. Command lines FTW! The Plex Media Scanner can actually be run from the command line and do a variety of things like scan, refresh, list sections, add new sections, etc.

What’s your favorite metadata agent? It would have to be the IMDB agent written by the brilliant and handsome Scott. It’s not perfect, but it’s almost frighteningly good. An anecdote from a recent tester explains it better than I ever possibly could: “I had a big pile of old Danish movies, some which contain certain 18+ content….Plex/Eight recognized them all as this one weird English documentary program with an innocent icon. Plex/Nine recognizes and identifies it correctly – exposing rather explicitly that I had this old and forgotten folder of movies….AMAZING“.

But when the site changes, it’ll break and I’ll complain. The new agents auto-update just like the plug-ins, so as soon as we fix it, everyone will instantly benefit.

Well, this all sounds too good to be true. Can you explain some of the rough edges? Sure! Like I said, VIDEO_TS movies need to be accessible via the local filesystem, they don’t work over HTTP yet. VIDEO_TS files don’t scan properly for TV shows yet (due to my personal hatred for the format?). Let’s see, what else? You can’t specify DVD order vs aired order at the moment. The Music Scanner is pretty slow. I’m sure there’s more, but you’ll tell us about it soon enough.

What about date-based shows? Well, I’m sure it’s not perfect, but this folder of junk scanned in perfectly. And if you haven’t seen the 2005-01-25 episode, I highly recommend it, Rob Cordry at his absolute best.

The Daily Show.jpg

So I added some sections, and now I’m totally mesmerized watching the Media Manager. Can you explain what it’s doing? Yes, the Core Animation viewer is quite fun to watch. Obviously, the starting point is the gray Plex icon. When it starts looking for a match, it gets an “atom” icon overlaid. If it finds a match, it goes dark while the metadata loads, which can actually take a while. After it’s loaded, it flips over with the poster. Also, since the media analysis happens in parallel, sometimes the gray icon turns into a thumb before the metadata is loaded as well, just depends on the order in which things happen. This image below shows the three stages.

Plex Media Manager.png

It takes forever! I’m impatient! The posters don’t show up in Plex! WTF? BBQ! There’s an easy solution for this one. Get a nice cold microbrew, put on some good music, and watch the Media Manager, while sitting in Lotus position. Watch it. Become one with it.

It doesn’t do movie collections yet! I can’t edit the metadata manually! I’m pissed off. I want my money back. Remember what I said about this being the ground floor level of the building? Give us a chance to add a few more floors, you won’t be disappointed.

I’ll leave you with Barkley, enjoying a lilikoi. Namaste.


The Best of Plex

Plex Pass gives you exclusive access to awesome new features and apps.

Learn More

The Best of Plex

Continuing the Conversation is a premium feature and requires a Plex Pass subscription.

Learn More

Plex Media Server

Plex Media Server is the software that allows you to stream your content to all of your devices, anywhere.

Learn More