How to force thumbnail view ?
#1
In my plugin I draw a list of video.

I think it will be great so see the list like "thumbnail view", and not the default narrow list.

is there a way to tell to xmbc to show the directory like grid and not like list ?

What I want to do Is exactloy what the youtube plugin does after search. Every video in a thumbnail with titles below each picture
Reply
#2
It's relatively easy, but you need to know the necessary View Mode IDs for every skin you're going to support. The code below does the trick:

PHP Code:
skin_used xbmc.getSkinDir()
if 
skin_used == 'skin.confluence':
    
xbmc.executebuiltin('Container.SetViewMode(500)'# "Thumbnail" view
elif skin_used == 'skin.aeon.nox':
    
xbmc.executebuiltin('Container.SetViewMode(512)'# "Info-wall" view. 

For other skins their default views will be used.
Reply
#3
1. Thanks
2. is it supposed/mandatory a plugin developer must support more than one skin ? Confluence is the default, is right?
3. If someone ask me to support other skin, after I download skin code, what must I search, to get this id ?
Reply
#4
2. No, additional skin support is completely up to you.
3. You need to look into MyVideoNav.xml, MyMusicNav.xml and MyPics.xml files from the necessary skin for video, music and pictures respectively. But note that not all views are available for plugins.

Just to be clear: View Mode IDs are different in every skin (except for a default view ID=50), so you need to do a skin check even if you're going to support only one skin.
Reply
#5
2.1 -- Confluence is the default skin ?
Reply
#6
(2013-09-24, 16:39)realtebo Wrote: 2.1 -- Confluence is the default skin ?

Yes, Confluence is the default skin. Sorry, I've thought it's a known fact.Smile
Reply
#7
Some time ago I walked through all available skins to find their "thumbnail likest" view id for xbmcswift inclusion.
PHP Code:
VIEW_MODES = {
    
'thumbnail': {
        
'skin.confluence'500,
        
'skin.aeon.nox'551,
        
'skin.confluence-vertical'500,
        
'skin.jx720'52,
        
'skin.pm3-hd'53,
        
'skin.rapier'50,
        
'skin.simplicity'500,
        
'skin.slik'53,
        
'skin.touched'500,
        
'skin.transparency'53,
        
'skin.xeebo'55,
    },

See here

Note: Since then there are much more skins available, if you take the time to get the IDs for the missing ones, I would be happy to get them too Wink
My GitHub. My Add-ons:
Image
Reply
#8
Of course, If I'll get one more, I'll send to you, I promise !
Reply
#9
(2013-09-24, 21:29)sphere Wrote: Some time ago I walked through all available skins to find their "thumbnail likest" view id for xbmcswift inclusion.

Code:
'skin.aeon.nox': 551,

The info for Aeon-Nox is outdated. There is no 551 code now. The code for "Wall" view is 500 too, but it is not available for plugins - providing 500 does nothing (maybe setting content type explicitly will help, I don't know), so you can use Info-Wall instead (see my code above).
Reply
#10
could you guys tell me where should i place the code? should i place it after addDir( ....)?
Reply

Logout Mark Read Team Forum Stats Members Help
How to force thumbnail view ?0