Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #7 from dersphere/viewmode

add possibility to set the view_mode via "plugin.add_items(items, view_mode)"
  • Loading branch information...
commit b2f74542bf9644abe254f4db22dedceddf525d60 2 parents b6a3938 + 048df83
Jonathan Beluch authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/xbmcswift/
4 lib/xbmcswift/
@@ -190,7 +190,7 @@ def _make_listitem(self, label, label2='', iconImage='', thumbnail='',
#return li
return options['url'], li, options.get('is_folder', True)
- def add_items(self, iterable):
+ def add_items(self, iterable, view_mode=None):
# If we are in debug mode, do not make the call to xbmc
# for each item
# if in debug mode, print it to command line
@@ -217,6 +217,8 @@ def add_items(self, iterable):
if self._mode is 'xbmc':
if not xbmcplugin.addDirectoryItems(self.handle, items, len(items)):
raise Exception, 'problem?'
+ if view_mode:
+ xbmc.executebuiltin('Container.SetViewMode(%s)' % view_mode)
return urls
Please sign in to comment.
Something went wrong with that request. Please try again.