DVD Order Agent + Theme Music Fix

As many people know, there are a few shows that aired in an order differently than it was released on DVD. TheTVDB (Plex’s default TV metadata source) tracks both, but shows air date by default. This creates a problem with Plex because it will always grab the info using the aired order.

When I found out about this, I tried to look for a solution and I found a metadata agent that someone on these forums created, but the development seemed to be dead, many people were reporting problems with theme music, and the thread was frankly a mess.

Thus, I tried to find the newest version of the agent I could and I have put it into a GitHub repo for easier access. I also forked Plex’s theme music agent to add support for the DVD Order Agent. That fork is located here.

These plugins should work alongside a normal Plex install just by putting theme into the appropriate Plug Ins folder. If there are any issues though, pull requests are 100% welcome. But, disclaimer: I don’t know much Python, so don’t expect me to be releasing bug fixes or updates to the code, I just wanted to make it easier to find and fix the theme music issue.

Thanks a bunch, works great!

@HuggableSquare it’s great that you did this, and I hope that you can update it at least if the original creators release updates here on the forums.

Also, it would be a lot more useful if you can post instructions into the README on github so that I don’t have to dig around to remember where the plugins folder is, etc.

Thanks for the agent. I found an issue that may or may not be within your control to fix. While Plex now shows Firefly in the correct DVD order, it is still trying to play back in the aired order.

For example, I watched Serenity which is episode 1 in DVD order and episode 11 in aired order. The next episode on Plex’s On Deck is “Heart of Gold” which is episode 13 in DVD order and episode 12 in aired order. Since I watched episode 11 in aired order, it now wants me to watch episode 12 in aired order despite being episodes 1 and 13 in DVD order.

On Deck always uses air date. you would have to manually change the date for the episodes to be in chronological order ( or make them all the same date which can be done for a single season by selecting all and editing all at once )

You are an absolute legend @HuggableSquare! Thank you so much this fixed my Batman Animated Series files!!! So happy to finally have these correctly listed in Plex.

@HuggableSquare Can you tell me how the theme music agent works and how to enable it for this series only?

@Penguin59 One thing I noticed is that in order to get the theme music agent to work its folder cannot be named PlexThemeMusic.bundle as it would be by default if you just did a straight clone of the git repository. I renamed it to PlexThemeMusicDVDOrder.bundle and then it was available under Settings > Server > Agents > Shows > TheTVDBdvdorder. Enable the checkbox for Plex Theme Music DVD Order and then use Fix Incorrect Match to use the DVD agent to update the metadata for the relevant shows. Now I have Firefly and Cosmos: A Spacetime Odyssey in correct order with theme music.

Awesome stuff thanks @dbent !!!

When I installed the DVD order agent and updated my library I didn’t even realise that it had removed the B:TAS theme music from playing. I followed your instructions and renamed the Plex Theme Music folder and now it works! Brilliant stuff, thanks for taking the time to let me know.

Penguin

@Penguin59 said:
You are an absolute legend @HuggableSquare! Thank you so much this fixed my Batman Animated Series files!!! So happy to finally have these correctly listed in Plex.

Same for me. Thank you so much!

Hello All, can someone help me with where to put this agent? I’ve spent the last few hours looking through a a few forums and I’ve found conflicting information as to where they go.

The most recent post said it should go here “jails/plexmediaserver_1/var/db/plexdata\Plex\ Media\ Server/Plug-ins” but that doesnt do anything after a restart.

Some help would be great

Many thanks

Will.

Hey @will1565, in Windows, navigate to: program files (x86)/plex/plexmediaserver. In that folder there should be a folder called “plugins[some numbers]”. Extract the files in @HuggableSquare’s attachment straight into there and restart the plex server.

Once Plex is back up and running go into “settings” then “server” then “agents” and make sure that “DVD order” agent is ticked so it will show up when matching shows.

Hope this helps,
Penguin

Thanks for the quick response @Penquin59 .Perhaps I should have mentioned I have it running on Freenas. fingers crossed you can still help :slight_smile:

Thanks a million!

Just got it working because of your excellent job! And thank you @dbent for explaining the renaming trick, as I was stuck on that part.

You guys are the best!

Think i got it all setup correctly, but when i go to fix incorrect match, and select the TheTVDBdvdorder as the search agent it returns “no matches found” (Other fields are “Firefly” “2002” and “English”)
Am i missing something??

@HephaestusMedia said:
Think i got it all setup correctly, but when i go to fix incorrect match, and select the TheTVDBdvdorder as the search agent it returns “no matches found” (Other fields are “Firefly” “2002” and “English”)
Am i missing something??

Aye, I was seeing the same thing - however, got it working. When searching to match manually, select TheTVDBdvdorder and type the TVDB ID (Firefly is 78874) in the “Title” field, rather than the name.

Hey @HephaestusMedia , what @lasher suggested would probably be the quickest and easiest way to navigate right to the correct show.

I was going to suggest removing the ‘year’ field in the search which often works for me if the search agent is having trouble picking up the show.

I would really like to see this added permanently. Oddly enough I couldn’t find a feature request for this so I created one, please take the time to go over and like the post (hopefully we can get this added into plex).

I posted this on the other thread so just copying here:

https://forums.plex.tv/discussion/comment/1229498/#Comment_1229498

@jooniloh said:
Question to the general public (those reading this thread anyway): Is anyone still developing (or still interested in developing) this agent? There’s an issue right now (best example: X-Files) where if you use the agent to fix a show, the show has a new or ongoing season that has not been assigned DVD ordering numbers yet in the TVDB, it’ll fail to match those items (obviously). With X-Files, that would be fixing season 4 and breaking season 10. It’d be great if it could somehow fall back on the Airdate ordering if DVD numbers are not found.

Thanks @HuggableSquare it works great :slight_smile: