Skip to content

Commit

Permalink
QML UI: "Mark episodes as old" menu item for "All episodes"
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jun 28, 2014
1 parent 4b52bd8 commit 64b9db9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gpodder/qmlui/__init__.py
Expand Up @@ -486,6 +486,7 @@ def podcastContextMenu(self, podcast):
menu = []

if isinstance(podcast, model.EpisodeSubsetView):
menu.append(helper.Action(_('Mark episodes as old'), 'mark-all-as-read', podcast))
menu.append(helper.Action(_('Update all'), 'update-all', podcast))
else:
menu.append(helper.Action(_('Update'), 'update', podcast))
Expand Down Expand Up @@ -628,6 +629,12 @@ def unsubscribe():
self.deleteEpisode(action.target)
elif action.action == 'episode-enqueue':
self.enqueueEpisode.emit(action.target)
elif action.action == 'mark-all-as-read':
for episode in action.target.get_all_episodes():
if not episode.was_downloaded(and_exists=True):
episode.mark(is_played=True)
self.update_subset_stats()
self.root.resort_podcast_list()
elif action.action == 'mark-as-read':
for episode in action.target.get_all_episodes():
if not episode.was_downloaded(and_exists=True):
Expand Down

0 comments on commit 64b9db9

Please sign in to comment.