def actions(self): """ return the default action """ actions = VideoItem.actions(self) items = actions[0:2] items.append((self.mark_to_keep, self.keep and _('Unmark to Keep') or _('Mark to Keep'))) items.append((self.mark_as_watched, self.watched and _('Unmark as Watched') or _('Mark as Watched'))) items.append(MenuItem(_('Search for more of this program'), search_for_more, (self, self.video_item.name))) items.append(MenuItem(_('Add to favorites'), add_to_favorites, (self, self.video_item.name))) items = items + actions[2:] return items
def actions(self): """ return a list of actions for this item """ dq = get_download_queue() if self.gip_type == "itv": if dq.is_downloading(self.gip_type, self.pid) or dq.is_queued(self.gip_type, self.pid): return [(self.cancel_download, _("Cancel Download")), (self.show_details, _("Full description"))] else: return [(self.download, _("Download")), (self.show_details, _("Full description"))] actions = VideoItem.actions(self) if dq.is_downloading(self.gip_type, self.pid) or dq.is_queued(self.gip_type, self.pid): actions.append((self.cancel_download, _("Cancel Download"))) else: actions.append((self.download, _("Download"))) return actions
def actions(self): """ return a list of actions for this item """ dq = get_download_queue() if self.gip_type == 'itv': if dq.is_downloading(self.gip_type, self.pid) or \ dq.is_queued(self.gip_type, self.pid): return [(self.cancel_download, _('Cancel Download')), (self.show_details, _('Full description'))] else: return [(self.download, _('Download')), (self.show_details, _('Full description'))] actions = VideoItem.actions(self) if dq.is_downloading(self.gip_type, self.pid) or \ dq.is_queued(self.gip_type, self.pid): actions.append((self.cancel_download, _('Cancel Download'))) else: actions.append((self.download, _('Download'))) return actions