Cannot get background image to show

I am having an annoying problem with my little pet-channel, MythRecordings (see https://forums.plex.tv/topic/86644-mythtv-plug-in/): while I can get icons (thumbs) to show for my DirectoryObjects, I cannot for the life of me figure out how to get the background images (art) to display.

 

Here's the line where I try to specify a background image (art):

iconName = '%s%s.png' % (iconPrefix, keyValue)
Log('iconName = %s' % iconName)
backgroundName = '%s%s.png' % (backgroundPrefix, keyValue)
Log('backgroundName = %s' % backgroundName)
oc.add(DirectoryObject(key=Callback(GetRecordingList, filterKeyName=keyName, filterKeyValue=keyValue, keyAliases=keyAliases, sortKeyName='StartTime'), title=keyValue, thumb=R(iconName), art=R(backgroundName)))

Here are the corresponding lines from the plug-in log:

2014-12-31 13:14:08,751 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_series.png
2014-12-31 13:14:08,751 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_series.png
2014-12-31 13:14:08,751 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_entertainment.png
2014-12-31 13:14:08,752 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_entertainment.png
2014-12-31 13:14:08,752 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_movie.png
2014-12-31 13:14:08,752 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_movie.png
2014-12-31 13:14:08,754 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_documentary.png
2014-12-31 13:14:08,754 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_documentary.png
2014-12-31 13:14:08,770 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_news.png
2014-12-31 13:14:08,770 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_news.png
2014-12-31 13:14:08,771 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_Children.png
2014-12-31 13:14:08,771 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_Children.png
2014-12-31 13:14:08,775 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_sport.png
2014-12-31 13:14:08,775 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_sport.png
2014-12-31 13:14:08,788 (7f9f6effd700) :  INFO (__init__:80) - iconName = CategoryIcon_Uncategorized.png
2014-12-31 13:14:08,788 (7f9f6effd700) :  INFO (__init__:82) - backgroundName = CategoryBackground_Uncategorized.png

When I look in my Contents/Resources folder, I get the following files:

thomas@mythbackend:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle/Contents/Resources$ ls -al Category*.png
-rwxr-xr-x 1 root root 2015804 Dec 31 12:52 CategoryBackground_Children.png
-rwxr-xr-x 1 root root 1076010 Dec 31 12:52 CategoryBackground_documentary.png
-rwxr-xr-x 1 root root 3051753 Dec 31 12:52 CategoryBackground_movie.png
-rwxr-xr-x 1 root root 2787248 Dec 31 12:52 CategoryBackground_series.png
-rwxr-xr-x 1 root root 2681934 Dec 31 12:52 CategoryBackground_sport.png
-rwxr-xr-x 1 root root  733283 Dec 31 12:12 CategoryIcon_Children.png
-rwxr-xr-x 1 root root  346455 Dec 31 12:13 CategoryIcon_documentary.png
-rwxr-xr-x 1 root root  724831 Dec 31 12:13 CategoryIcon_movie.png
-rwxr-xr-x 1 root root  626715 Dec 31 12:15 CategoryIcon_series.png
-rwxr-xr-x 1 root root  764469 Dec 31 12:15 CategoryIcon_sport.png

The weird thing is: the icon (CategoryIcon_*.png) show up perfectly well, whereas the background image (CategoryBackground_*.png) is never displayed - though they are treated in exactly the same way in the code.

 

Anyone have a clue? Am I just using the wrong clients (I've tried iPad and web)?

 

Or have I simply misunderstood the purpose of the art attribute (I'm assuming it specifies the background image to be shown when you open the DirectoryObject)?

 

I'm hoping someone can help - I'm at my wits' end...

 

/Happy New Year

thomas

 

[UPDATE]

I've tried converting the background images to .jpg (and changing the code accordingly), but that didn't help :-(

Which client are you using?

I ask because I think there is a big difference between clients regarding this, i.e. if they care about this attribute or not.

Web (http://192.168.2.10:32400/web/index.html#), Roku, iPad and Android (the latter 2 the PlexPass versions of the app). All disregard the art.

Oh, sorry I didn't read your first post thoroughly enough.

If you set the art attribute for a DirectoryObject it will be used only for displaying the art when it is "highlighted". In PHT this will work, but in those other clients it won't because there is no way of highlighting a specific DirectoryObject?

So, what you probably want to do is to pass the art as a parameter to the 'GetRecordingList' function and use that as art parameter for the ObjectContainer and/or EpisodeObjects created in that function.

Yes! I tried setting the art attribute all over the place, and now I get backgrounds - now I just need to figure out which of the "art=R(...)" additions that did the trick.

But that'll be for tomorrow (or, realistically, the day after :-)

Thanks for your help meo!

/thomas

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.