DVD Order Agent

Hi- I can't get this installed on FreeNAS, can anyone help? Here is what i have done:

Stop Plex.

Copy plugin to plugin dir:

mkdir /mnt/vol1/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

cp -i -R -p -v /mnt/vol1/‘DVD Order Agent.bundle’/ /mnt/vol1/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

Log into plex jail, then change owner.
chown -R plex /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

Restart Jail, then start plex.

But the agent doesn't show in "Edit Library -> Agents". I see only 3) "Personal Media Shows" "The TVDB"  "The Movie Database" 

Hi- I can't get this installed on FreeNAS, can anyone help? Here is what i have done:

Stop Plex.

Copy plugin to plugin dir:

mkdir /mnt/vol1/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

cp -i -R -p -v /mnt/vol1/‘DVD Order Agent.bundle’/ /mnt/vol1/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

Log into plex jail, then change owner.
chown -R plex /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Plug-ins/‘DVD Order Agent.bundle’/

Restart Jail, then start plex.

But the agent doesn't show in "Edit Library -> Agents". I see only 3) "Personal Media Shows" "The TVDB"  "The Movie Database" 

I have never used freenas but as far as i can tell you are putting it in the wrong plugins folder. see here https://forums.plex.tv/topic/161624-adding-agent-to-plex-freenas/

Just installed this today to fix my Firefly. The order's fine now but the theme music's gone. I've gone over all my settings and everything that needs to be checked is checked. I've unmatched and rematched several times, but no luck. When I go back to the default agent, the theme music works again. Any suggestions? I'm running my server on win 8.1.

Edit:

Nevermind! Figured it out. Did not see the bit about editing PlexThemeMusic.bundle's __init__.py earlier. The last mention of having to do this was quite a while ago, and the file has changed a bit since. I know others have had this issue and not everyone knows Python, so I've copied the contents of my __init__.py here. Just open /PlexThemeMusic.bundle/Contents/Code/__init__.py and replace the contents with the code below, restart your server, and rematch/refresh the show you're matching with this agent, and the theme music should work properly. PMS seems to rewrite this file quite regularly with the original, so marking it read-only wouldn't hurt.

#Plex Theme Music
THEME_URL = 'http://tvthemes.plexapp.com/%s.mp3'

def Start():
HTTP.CacheTime = CACHE_1DAY

class PlexThemeMusicAgent(Agent.TV_Shows):
name = ‘Plex Theme Music’
languages = [Locale.Language.NoLanguage]
primary_provider = False
contributes_to = [
‘com.plexapp.agents.thetvdb’,
‘com.plexapp.agents.thetvdbdvdorder’,
‘com.plexapp.agents.themoviedb’
]

def search(self, results, media, lang):

if media.primary_agent == 'com.plexapp.agents.thetvdb' or media.primary_agent == 'com.plexapp.agents.thetvdbdvdorder':
  results.Append(MetadataSearchResult(
    id = media.primary_metadata.id,
    score = 100
  ))

elif media.primary_agent == 'com.plexapp.agents.themoviedb':
  # Get the TVDB id from the Movie Database Agent
  tvdb_id = Core.messaging.call_external_function(
    'com.plexapp.agents.themoviedb',
    'MessageKit:GetTvdbId',
    kwargs = dict(
      tmdb_id = media.primary_metadata.id
    )
  )

  if tvdb_id:
    results.Append(MetadataSearchResult(
      id = tvdb_id,
      score = 100
    ))

def update(self, metadata, media, lang):
if THEME_URL % metadata.id not in metadata.themes:
try:
metadata.themes[THEME_URL % metadata.id] = Proxy.Media(HTTP.Request(THEME_URL % metadata.id))
except:
pass

I'm running Windows 7 and I don't understand how to use this plugin for a particular folder within my TV Shows (like Firefly).  I can't right-click in a web browser.  The pencil icon just brings up the regular, General, Tags, Sharing, Poster, Banner and Background.  I have it installed in my plugins.

What's next?

Thanks.

I'm running Windows 7 and I don't understand how to use this plugin for a particular folder within my TV Shows (like Firefly). I can't right-click in a web browser. The pencil icon just brings up the regular, General, Tags, Sharing, Poster, Banner and Background. I have it installed in my plugins.

What's next?
Thanks.


Open the show. On the left, there's a menu button. In the menu, use either Fix incorrect match or unmatch and match again. When matching, choose this agent.

Make sure your files are named in DVD order first.
![post-2548-0-80505600-1432058770.png|312x499](upload://oAiOSWP7z6Rc4iyrzRnDiw5Km87.png)

![post-2548-0-04107800-1432058713.png|549x298](upload://cSiZFJHMjxYQiObF2jLGnTaAjf0.png)

Thanks. I found it now.

What would be great is if a list could be compiled of all the shows that have DVD orders differing from its aired order. I'm going through my library season by season with TVDB trying to find them and it's taking a looong time. It'd be nice if TVDB allowed list sorting so I could just view the dvd order sorted via air date and just look down the episode # list to find them, but it doesn't, so I have to read down the air dates instead, trying to spot places where the dates aren't in order.

It'd be nice if Plex added more options regarding things like this and let us pick how to sort things. I don't mind defaults, but at least let us change them for something as simple as sorting order.


Nevermind! Figured it out. Did not see the bit about editing PlexThemeMusic.bundle’s init.py earlier. The last mention of having to do this was quite a while ago, and the file has changed a bit since. I know others have had this issue and not everyone knows Python, so I’ve copied the contents of my init.py here. Just open /PlexThemeMusic.bundle/Contents/Code/init.py and replace the contents with the code below, restart your server, and rematch/refresh the show you’re matching with this agent, and the theme music should work properly. PMS seems to rewrite this file quite regularly with the original, so marking it read-only wouldn’t hurt.
-------------------------------
 
Turns out making it read-only doesn't help.  I did a lot of changes today to make Plex work with DVD order on a few series, and it kept resetting back to normal.
Nevermind! Figured it out. Did not see the bit about editing PlexThemeMusic.bundle's __init__.py earlier. The last mention of having to do this was quite a while ago, and the file has changed a bit since. I know others have had this issue and not everyone knows Python, so I've copied the contents of my __init__.py here. Just open /PlexThemeMusic.bundle/Contents/Code/__init__.py and replace the contents with the code below, restart your server, and rematch/refresh the show you're matching with this agent, and the theme music should work properly. PMS seems to rewrite this file quite regularly with the original, so marking it read-only wouldn't hurt.
-------------------------------
 
Turns out making it read-only doesn't help.  I did a lot of changes today to make Plex work with DVD order on a few series, and it kept resetting back to normal.

What changes? My file hasn't changed since I marked it read only. If read-only doesn't work, you could always try tweaking the file permissions so that plex can't write to it.

It was mentioned quite a while back, but no one seems to have addressed it. Any plans to update to include opensubtitles.org? It'd be nice to have. Also, to fix the issue of the built-in theme music agent rewriting itself, why not create a second, duplicate theme music agent coded to work with thetvdbdvdorder agent that won't get rewritten by plex (and same for the opensubtitles agent if it gets added since I imagine it'd probably have the same issue)?

Ok. Read through quite a bit of this and downloaded the last file I found a couple pages back. I've been unable to get this to work on the Seinfeld DVD Bundles. They were aired in a different order than they were released on DVD and I prefer the DVD. Any help that anyone has would be appreciated.

Where all did everything get installed?

Do you see an option from your PMM to use the DVD Order Agent at all?

SC

Yes I have seen that. It says thetvdvdorder as a select option when matching 

Hi all,

I've just found this plugin after having some trouble getting my Futurama episodes named correctly. I downloaded the zip on page 12 as it was the most recent on I could find. It seems to have named everything correctly wit correct metadata as far as I can tell, but it has completely missed my specials folder and a number of episodes from season four, namely episodes 2,3,4 and 19 (the first of the debated tv movies, although it has dealt with the other 3 fine). Any suggestions?

Thanks

Hi all,

I've just found this plugin after having some trouble getting my Futurama episodes named correctly. I downloaded the zip on page 12 as it was the most recent on I could find. It seems to have named everything correctly wit correct metadata as far as I can tell, but it has completely missed my specials folder and a number of episodes from season four, namely episodes 2,3,4 and 19 (the first of the debated tv movies, although it has dealt with the other 3 fine). Any suggestions?

Thanks

I managed to fix the specials by renaming the folder from Specials to Season 00, although as far as I remember the plex media naming guide suggests you can use either. I assume this is just a quirk of the plugin

I managed to fix the specials by renaming the folder from Specials to Season 00, although as far as I remember the plex media naming guide suggests you can use either. I assume this is just a quirk of the plugin

Weirdly it is all now fine... I decided to move episode 19 to specials since it is listed twice on tvdb (bender's big score) and that broke specials but fixed the rest of season 4. After some more filing and moving episode 19 back to season 4 all of the episodes ar enow showing up correctly... Alex can work in mysterious ways sometimes.

Yes I have seen that. It says thetvdvdorder as a select option when matching 

If you haven't, I believe you need to fix the incorrect match, and then select dvdorder to get it to rescan.

If you have done that, then perhaps looking at the relevant logs will yield some information as to what is going on.

I managed to fix the specials by renaming the folder from Specials to Season 00, although as far as I remember the plex media naming guide suggests you can use either. I assume this is just a quirk of the plugin

Everyone seems to have their own way or organizing things. I have found that the simplest ways tend to work best for me. The only issue I tend to run into is the DVD Order from TheTvDB as I think my plug-in is out of date (trying to remedy that now).
 
Here is an example of how I organize all of my files. This way seems to be the cleanest and most efficient, in my opinion.

Archer

 - Season 0

    - 01 - Archersaurus

 - Season 1

    - 01 - Mole Hunt

I wanted to post a screen shot of the folder set up but i couldn't figure out how to upload the photo. :-(

Edit: I'm and idiot and didn't realize there was a "Full Editor" mode. *face palm*

![post-86925-0-76528100-1435010593.png|690x389](upload://3sXJI2sT2T7VtSpfdQh9Fa4qIlY.png)

I seem to be running into the issue where TheTvDbDVDOrder will not return any results. I have unmatched the tv shows multiple times.

I'm having this issue with Firefly, Aeon Flux, and Batman: TAS. I know Firefly is the bane of existence for DVD Order guys, like myself. 

Here are some screen shots. I would post the logs as well, but I don't know how to find those. 

![post-86925-0-08346000-1435010339.png|690x377](upload://vbyWjAGT3nt7KB8FHFzFAE5dSF8.png)

![post-86925-0-32894400-1435010391.png|690x353](upload://ggHek9CNZTGpfW6QGCKVyZaZ5W2.png)

![post-86925-0-21815400-1435010380.png|690x378](upload://b2Ea2zmJV4SKFRSbsRErWvk5OOB.png)

![post-86925-0-22693800-1435010388.png|690x377](upload://o3PaBiCgVENLkBipIRhvaN1fVc.png)