State change updates

This commit is contained in:
Thomas Perl 2014-01-31 17:10:53 +01:00
parent a271e6b764
commit a8170962d1
3 changed files with 6 additions and 0 deletions

View file

@ -215,9 +215,12 @@ class gPotherSide:
def toggle_new(self, episode_id):
episode = self._get_episode_by_id(episode_id)
episode.is_new = not episode.is_new
if episode.is_new and episode.state == gpodder.STATE_DELETED:
episode.state = gpodder.STATE_NORMAL
episode.save()
self.core.save()
pyotherside.send('is-new-changed', episode_id, episode.is_new)
pyotherside.send('state-changed', episode_id, episode.state)
@run_in_background_thread
def check_for_episodes(self):