Skip to content

Commit

Permalink
QML UI: Honor pause_subscription floag (bug 1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Aug 16, 2012
1 parent 3a9eb69 commit 50501c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gpodder/qmlui/__init__.py
Expand Up @@ -493,14 +493,17 @@ def find_episode(podcast_url, episode_url, counter):
util.run_in_background(lambda: merge_proc(self))

for podcast in self.root.podcast_model.get_objects():
podcast.qupdate(finished_callback=self.update_subset_stats)
if not podcast.pause_subscription:
podcast.qupdate(finished_callback=self.update_subset_stats)

@Slot(int)
def contextMenuResponse(self, index):
assert index < len(self.context_menu_actions)
action = self.context_menu_actions[index]
if action.action == 'update':
action.target.qupdate(finished_callback=self.update_subset_stats)
podcast = action.target
if not podcast.pause_subscription:
podcast.qupdate(finished_callback=self.update_subset_stats)
elif action.action == 'force-update':
action.target.qupdate(force=True, \
finished_callback=self.update_subset_stats)
Expand Down Expand Up @@ -1152,7 +1155,7 @@ def extensions_podcast_update_cb(self, podcast):
logger.debug('extensions_podcast_update_cb(%s)', podcast)
try:
qpodcast = self.podcast_to_qpodcast(podcast)
if qpodcast is not None:
if qpodcast is not None and not qpodcast.pause_subscription:
qpodcast.qupdate(
finished_callback=self.controller.update_subset_stats)
except Exception, e:
Expand Down
1 change: 1 addition & 0 deletions src/gpodder/qmlui/model.py
Expand Up @@ -327,6 +327,7 @@ def __init__(self, db, podcast_list_model, title, description, eql=None):
self.title = title
self.description = description
self.eql = eql
self.pause_subscription = False

self._new_count = -1
self._downloaded_count = -1
Expand Down

0 comments on commit 50501c8

Please sign in to comment.