I think the he is describing a scenario I come across quite regularly, mostly on my tablet device.
The first time I start an addon it starts in ListView (50), I change it to Thumbnails (500) as this is easier to use on a tablet, I then click on an item in the addon to open up a new section of the addon, this then reverts to ListView, I set this to Thumbnails and click on an item, once again it reverts Listview, etc etc.
Personally what I would like is each new section that opens to open in the same viewtype as its parent, so I set the first page of the addon to be Thumbnails, then every subsequent page in that addon would automatically opens in the Thumbnails view.
(2015-07-04, 20:46)Ned Scott Wrote: He wants the opposite. Currently he has to change each "page" individually, and he would rather change all for each "section". From his description it sounds like he is talking about add-on content and not Kodi's normal views or library, and as such he would need to take his request to a specific add-on author for said add-on.
As an addon developer I would love to be able to implement said functionality but the problem is trying to determine the id of the current view, as far as I can tell there is no way to determine what this id is, the Container.Viewmode infolabel returns the current view as a string but this cannot then be be used in a call to Container.SetViewMode
Ideally another infolabel that returns the ID of the current view type would be perfect then you could just do this:
Code:
import xbmc
viewID = int(xbmc.getInfoLabel('Container.ViewID')) #the new info label
#main addon code
#
#
#finally after xbmcplugin.endOfDirectory
xbmc.executebuiltin('Container.SetViewMode(%d)' % viewID)