Thumbs on first screen channel?

I'm trying to add thumbs to first page of my channel but I can't get that to happen. With the exact same code the thumbs appear on the second page of my channel. I can't figure out what I'm doing wrong.
 
This is what I have so far: http://paste.ubuntu.com/6022007/
 
Could somebody give me a pointer why I can't show thumbnails in the MainMenu() of a channel?

You have to put an R before the fallback icon so it knows to look for it in your Resources folder.

Your code may work if you change it to:

thumb=Resource.ContentsOfURLWithFallback(url='http://vimcasts.org/images/posters/show_invisibles.png', fallback=R('icon-default.png'))

I always save the default images to my Resources folder, then create a variable for it so it makes it easier for multiple calls and I can set it as the default for different objects in the Start function, so I do not have to add the default thumb to every object in my code. It tends to look like this:

TITLE = 'MyShow'
PREFIX = '/video/myshow'
ART = 'art-default.jpg'
ICON = 'icon-default.png'
####################################################################################################
# Set up containers for all possible objects
def Start():

  ObjectContainer.title1 = TITLE
  ObjectContainer.art = R(ART)

DirectoryObject.thumb = R(ICON)
DirectoryObject.art = R(ART)

#####################################################################################
@handler(PREFIX, TITLE, art=ART, thumb=ICON)
def MainMenu():

And then if you are using the default art or thumb, you do not need to add it to the end of any of your directory objects.

If I do need to call it somewhere, I can pull it like this:

thumb = R(ICON) or fallback = R(ICON)

In examples you may see from the channel store, they may not have this code because once the channel is in the channel store, the default icon and art images for your channel are added to a Plex site they have for default images and it  automatically uses those image as the default for your thumb and art and no longer requires some of the code I show in the example above.

Exactly what can be removed once your images are added to the Plex site, is a question I would be interested in knowing the answer to myself.

Thanks for the clarification! It's working now but I swear the thumbnails and summaries sometimes get shown and sometimes not. 

I've got a new screen which shows the episodes parsed from a RSS feed: no thumbs and summaries. If I add the shows in that same objectcontainer the thumbs DO get shown.

I'm starting to believe there's some weird caching involved or something :(

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