Themes ignoring order specified under "Info Provider Settings"?

I wrote my own Theme Music agent (to have themes >30sec), but it looks like Plex ignores the ordering I specified under “Info Provider Settings.” (MyThemeMusic is above PlexThemeMusic) When I do a “Refresh Info” on shows that have no theme, it all works perfectly. However, when the show already has a theme, the log says that my theme is being downloaded, but it still plays the old (<30sec) one, when I open the show in Plex.app.



Btw. my agent is basically the PlexThemeMusic agent with another THEME_URL.

Maybe you guys need more info to help me …

Agent Code:


#Haru Theme Music<br />
THEME_URL = 'http://10.0.0.2/tvthemes/%s.mp3'<br />
<br />
def Start():<br />
  HTTP.CacheTime = CACHE_1DAY<br />
  <br />
class HaruThemeMusicAgent(Agent.TV_Shows):<br />
  name = 'Haru Theme Music'<br />
  languages = [Locale.Language.English]<br />
  primary_provider = False<br />
  contributes_to = ['com.plexapp.agents.thetvdb']<br />
  <br />
  def search(self, results, media, lang):<br />
    results.Append(<br />
      MetadataSearchResult(<br />
        id    = media.primary_metadata.id.replace('tt',''),<br />
        score = 100<br />
      )    <br />
    )<br />
    <br />
  def update(self, metadata, media, lang):<br />
    if THEME_URL % metadata.id not in metadata.themes:<br />
      try:<br />
        metadata.themes[THEME_URL % metadata.id] = Proxy.Media(HTTP.Request(THEME_URL % metadata.id))<br />
      except:<br />
        pass



Info Provider Settings
![post-3458-12851517438238.png|482x370](upload://q2mpqpxvoQSNkBCXN70SubHnrtK.png)

/tvthemes/ directory
![post-3458-12851518191283.png|535x321](upload://4zjY9FyCPnmiAy4Qaed4NsnLcTj.png)

When I do a "Refresh Info" on something like Boardwalk Empire (which PlexThemeMusic doesn't have a theme for) it works perfectly, however, for shows that PlexThemeMusic already provided me with a theme (like Caprica) it plays the <30sec one, even though my "full" version seems to be downloaded.

Still not working (tested with the latest hotfix). If this is a bug, I would appreciate it if a Dev could at least tell me: “Yes it is.”

Anyway, today I took another look at it and figured out a few new things (keeping Caprica as my example):


  • Everything in the /Users/**/Library/Application Support/Plex Media Server/Metadata/TV Shows/6/7dc6ff8a8ff86cafee508bc21fa9c6ea532a197.bundle/Contents/com.plexapp.agents.haruthememusic/ folder looks correct.
  • The Info.xml file under _combined looks correct, too:

...<br />
<themes><br />
  <item external="True" url="http://10.0.0.2/tvthemes/85040.mp3" media="com.plexapp.agents.haruthememusic_4a2e586b336cae82f2dc7f187a7d464c77633f53"/><br />
  <item external="True" url="http://tvthemes.plexapp.com/85040.mp3" media="com.plexapp.agents.plexthememusic_50eb86e70d700ab94182d223a4d4d8f7aa7b70d4"/><br />
</themes><br />
...


- The *themes* directory under *_combined* looks correct, too:
[list]
[*]com.plexapp.agents.haruthememusic_4a2e586b336cae82f2dc7f187a7d464c77633f53
[*]com.plexapp.agents.plexthememusic_50eb86e70d700ab94182d223a4d4d8f7aa7b70d4
[/list]

The first thing that comes to mind is that the media server won’t overwrite an existing theme if it’s picked it. So for example, if you first scanned with the Plex Theme Agent, it’ll keep that one, and even if you later move around orders, it’ll still keep the one it first picked.



This will be improved shortly when we allow full local editing and “locking” of fields.



If you do a “Fix Incorrect Match” (even if you pick the same show) it should reset and pick the one that’s first in the list again.



Can you verify first that it’s not just a “sticky” theme and then we’ll go from there?



If by "sticky" you mean that it simply sticks with the first (i. e. Plex Theme Music) one, than that's indeed the problem. Doing a "Fix Incorrect Match" on *Caprica* solved my problem. It now plays my long/full theme.

Thank you :)