def add_favourite(self): """ Adds the selected item to the favourites. The opens the favourite list. """ # remove the item item = self._pickler.de_pickle_media_item( self.params[self.keywordPickle]) # no need for dates in the favourites # item.clear_date() Logger.debug("Adding favourite: %s", item) f = Favourites(Config.favouriteDir) if item.is_playable(): action = self.actionPlayVideo else: action = self.actionListFolder # add the favourite f.add(self.channelObject, item, self._create_action_url(self.channelObject, action, item)) # we are finished, so just open the Favorites self.favourites()
def add_favourite(self): """ Adds the selected item to the favourites. The opens the favourite list. """ # remove the item item = self.media_item # no need for dates in the favourites # item.clear_date() Logger.debug("Adding favourite: %s", item) f = Favourites(Config.favouriteDir) if item.is_playable(): action_value = action.PLAY_VIDEO else: action_value = action.LIST_FOLDER # add the favourite f.add(self.channelObject, item, self.create_action_url(self.channelObject, action_value, item)) # we are finished, so just open the Favorites self.favourites()