Example #1
0
 def watchlater(self, episode_id, title):
     """Watch an episode later"""
     succeeded = self.update_watchlater(episode_id=episode_id,
                                        title=title,
                                        watch_later=True)
     if succeeded:
         notification(message=localize(30403, title=title))
         container_refresh()
Example #2
0
 def watchlater(self, uuid, title, url):
     ''' Watch an episode later '''
     succeeded = self.update(uuid=uuid,
                             title=title,
                             url=url,
                             watch_later=True)
     if succeeded:
         notification(message=localize(30403, title=title))
         container_refresh()
Example #3
0
 def watchlater(self, asset_id, title, url):
     """Watch an episode later"""
     succeeded = self.update(asset_id=asset_id,
                             title=title,
                             url=url,
                             watch_later=True)
     if succeeded:
         notification(message=localize(30403, title=title))
         container_refresh()
 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()
 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()
Example #6
0
    def onSettingsChanged(self):  # pylint: disable=invalid-name
        """Handler for changes to settings"""

        log(1, 'Settings changed')
        TokenResolver().refresh_login()

        # Init watching activity again when settings change
        self.init_watching_activity()

        # Refresh container when settings change
        container_refresh()
    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)

        container_refresh()
Example #8
0
    def onSettingsChanged(self):  # pylint: disable=invalid-name
        """Handler for changes to settings"""

        log(1, 'Settings changed')
        TokenResolver().refresh_login()

        invalidate_caches('continue-*.json', 'favorites.json',
                          'my-offline-*.json', 'my-recent-*.json',
                          'resume_points.json', 'watchlater-*.json')

        # Init watching activity again when settings change
        self.init_watching_activity()

        # Refresh container when settings change
        container_refresh()
 def follow(self, program_name, title, program_id=None):
     """Follow your favorite program"""
     succeeded = self.update(program_name, title, program_id, True)
     if succeeded:
         notification(message=localize(30411, title=title))
         container_refresh()
Example #10
0
 def follow(self, program, title):
     ''' Follow your favorite program '''
     succeeded = self.update(program, title, True)
     if succeeded:
         notification(message=localize(30411, title=title))
         container_refresh()