How to change view for a folder
#1
Hi,

I'm starting development on a XBMC plugin and i was wondering how to change the default view directly from my plugin code ?
I found a way to change the sort method but nothing about the view. I would like to make the Thumbnail view the default for every folder of my script.

Thanks a lot
Reply
#2
You can't. All you can do is set the content type. The view to show is then up to the skin.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall Wrote:You can't. All you can do is set the content type. The view to show is then up to the skin.

I'm sorry, but you can. Sure - its not a nice way, but it is possible and some plugins (youtube for example) are using it.

They are doing it with something like
Code:
xbmc.executebuiltin('Container.SetViewMode(500)')
after the addDirectoryItems-call but before the endOfDirectory-call.

The videmode-ids are declared in the skins - 500 is thumbnail view in most skins.

I hope there will be a cleaner way in the future *g*

regards,
sphere
My GitHub. My Add-ons:
Image
Reply
#4
There won't be a cleaner way to do that, no. There will be better content setting (essentially finer grained) capabilities, so that the skin can react much better to choose the correct view mode.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Sounds promising.
That's what I wanted to say with "nicer way" Smile

regards,
sphere
My GitHub. My Add-ons:
Image
Reply
#6
Thanks a lot for your help Smile
Reply

Logout Mark Read Team Forum Stats Members Help
How to change view for a folder0