def set_content(self, content): '''Sets the content type for the plugin.''' # TODO: Change to a warning instead of an assert. Otherwise will have # to keep this list in sync with # any XBMC changes. #contents = ['files', 'songs', 'artists', 'albums', 'movies', #'tvshows', 'episodes', 'musicvideos'] #assert content in contents, 'Content type "%s" is not valid' % content xbmcplugin.setContent(self.handle, content)
def set_content(self, content): '''Sets the content type for the plugin.''' # TODO: Change to a warning instead of an assert. Otherwise will have # to keep this list in sync with # any XBMC changes. contents = ['files', 'songs', 'artists', 'albums', 'movies', 'tvshows', 'seasons', 'episodes', 'musicvideos', 'genres', 'years', 'actors', 'playlists', 'plugins', 'studios', 'directors', 'sets', 'tags', 'countries', 'roles', 'images', 'Addons', 'LiveTV'] #assert content in contents, 'Content type "%s" is not valid' % content if content not in contents: return False else: xbmcplugin.setContent(self.handle, content) return True
def main(): if '/movies' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'movies') elif '/tv' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'tvshows') elif '/music' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'musicvideos') elif '/live' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'LiveTV') elif '/list' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'playlists') else: pass plugin.run()
def main(): if "/movies" in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), "movies") elif "/tv" in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), "tvshows") elif "/music" in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), "musicvideos") elif "/live" in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), "LiveTV") elif "/list" in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), "playlists") else: pass plugin.run()
def set_content(self, content): '''Sets the content type for the plugin.''' # TODO: Change to a warning instead of an assert. Otherwise will have # to keep this list in sync with # any XBMC changes. contents = [ 'files', 'songs', 'artists', 'albums', 'movies', 'tvshows', 'seasons', 'episodes', 'musicvideos', 'genres', 'years', 'actors', 'playlists', 'plugins', 'studios', 'directors', 'sets', 'tags', 'countries', 'roles', 'images', 'Addons', 'LiveTV' ] #assert content in contents, 'Content type "%s" is not valid' % content if content not in contents: return False else: xbmcplugin.setContent(self.handle, content) return True
def set_content(self, content): '''Sets the content type for the plugin.''' xbmcplugin.setContent(self.handle, content)
def main(): if '/movies' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'movies') elif '/tv/play' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'episodes') elif '/tvdb' in sys.argv[0] and sys.argv[0].count('/') < 6: xbmcplugin.setContent(int(sys.argv[1]), 'seasons') elif '/tvdb' in sys.argv[0] and sys.argv[0].count('/') > 5: xbmcplugin.setContent(int(sys.argv[1]), 'episodes') elif '/tv' in sys.argv[0] and not '/settings' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'tvshows') elif '/music' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'musicvideos') elif '/live' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'LiveTV') elif '/list' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'videos') plugin.run()
def main(): if '/movies' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'movies') elif '/tv' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'tvshows') plugin.run()
def main(): if '/movies' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'movies') elif '/tv' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'tvshows') elif '/music' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'musicvideos') elif '/live' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'LiveTV') elif '/list' in sys.argv[0]: xbmcplugin.setContent(int(sys.argv[1]), 'videos') else: xbmcplugin.setContent(int(sys.argv[1]), 'videos') plugin.run()