コード例 #1
0
 def unfollow(self, program_name, title, program_id=None, move_down=False):
     """Unfollow your favorite program"""
     succeeded = self.update(program_name, title, program_id, False)
     if succeeded:
         notification(message=localize(30412, title=title))
         # If the current item is selected and we need to move down before removing
         if move_down:
             input_down()
         container_refresh()
コード例 #2
0
 def unwatchlater(self, asset_id, title, url, move_down=False):
     """Unwatch an episode later"""
     succeeded = self.update(asset_id=asset_id, title=title, url=url, watch_later=False)
     if succeeded:
         notification(message=localize(30404, title=title))
         # If the current item is selected and we need to move down before removing
         if move_down:
             input_down()
         container_refresh()
コード例 #3
0
    def remove(self, keywords):
        """Remove existing keywords from search history"""
        history = self.read_history()

        try:
            history.remove(keywords)
        except ValueError:
            return

        # If keywords was successfully removed, write to disk
        self.write_history(history)

        input_down()
        container_refresh()