def __init__(self, plugin, sortmethods=None):
Film.__init__(self)
self.plugin = plugin
self.handle = plugin.addon_handle
self.settings = Settings()
# define sortmethod for films
# all av. sort method and put the default sortmethod on first place to be used by UI
allSortMethods = [
xbmcplugin.SORT_METHOD_TITLE,
xbmcplugin.SORT_METHOD_DATE,
xbmcplugin.SORT_METHOD_DATEADDED,
xbmcplugin.SORT_METHOD_SIZE,
xbmcplugin.SORT_METHOD_DURATION
]
if sortmethods is not None:
self.sortmethods = sortmethods
else:
method = allSortMethods[0]
allSortMethods[0] = allSortMethods[self.settings.filmSortMethod]
allSortMethods[self.settings.filmSortMethod]=method
self.sortmethods = allSortMethods
self.showshows = False
self.showchannels = False