def save(self): """ Save admin to disk """ data = (self.last_update, self.grand_total, self.day_total, self.week_total, self.month_total, self.end_of_day, self.end_of_week, self.end_of_month, self.quota, self.left, self.q_time, self.timeline_total) sabnzbd.save_admin(data, BYTES_FILE_NAME)
def save(self): """ Save admin to disk """ data = (self.last_update, self.grand_total, self.day_total, self.week_total, self.month_total, self.end_of_day, self.end_of_week, self.end_of_month, self.quota, self.left, self.q_time, self.timeline_total ) sabnzbd.save_admin(data, BYTES_FILE_NAME)
def save(self): """ Save admin to disk """ if self.grand_total or self.day_total or self.week_total or self.month_total: data = (self.last_update, self.grand_total, self.day_total, self.week_total, self.month_total, self.end_of_day, self.end_of_week, self.end_of_month, ) sabnzbd.save_admin(data, BYTES_FILE_NAME)
def save(self, save_nzo=None): """ Save queue, all nzo's or just the specified one """ logging.info("Saving queue") nzo_ids = [] # Aggregate nzo_ids and save each nzo for nzo in self.__nzo_list: nzo_ids.append(os.path.join(nzo.work_name, nzo.nzo_id)) if save_nzo is None or nzo is save_nzo: sabnzbd.save_data(nzo, nzo.nzo_id, nzo.workpath) if not nzo.futuretype: nzo.save_to_disk() sabnzbd.save_admin((QUEUE_VERSION, nzo_ids, []), QUEUE_FILE_NAME)
def save(self): """ Save admin to disk """ if self.grand_total or self.day_total or self.week_total or self.month_total: data = ( self.last_update, self.grand_total, self.day_total, self.week_total, self.month_total, self.end_of_day, self.end_of_week, self.end_of_month, ) sabnzbd.save_admin(data, BYTES_FILE_NAME)
def save(self, save_nzo=None): """ Save queue, all nzo's or just the specified one """ logging.info("Saving queue") nzo_ids = [] # Aggregate nzo_ids and save each nzo for nzo in self.__nzo_list[:]: if not nzo.deleted: nzo_ids.append(os.path.join(nzo.work_name, nzo.nzo_id)) if save_nzo is None or nzo is save_nzo: sabnzbd.save_data(nzo, nzo.nzo_id, nzo.workpath) if not nzo.futuretype: nzo.save_to_disk() sabnzbd.save_admin((QUEUE_VERSION, nzo_ids, []), QUEUE_FILE_NAME)
def save(self, save_nzo: Union[NzbObject, None, bool] = None): """ Save queue, all nzo's or just the specified one """ logging.info("Saving queue") nzo_ids = [] # Aggregate nzo_ids and save each nzo for nzo in self.__nzo_list[:]: if not nzo.is_gone(): nzo_ids.append(os.path.join(nzo.work_name, nzo.nzo_id)) if save_nzo is None or nzo is save_nzo: if not nzo.futuretype: # Also includes save_data for NZO nzo.save_to_disk() else: sabnzbd.save_data(nzo, nzo.nzo_id, nzo.admin_path) sabnzbd.save_admin((QUEUE_VERSION, nzo_ids, []), QUEUE_FILE_NAME)
def save(self): """ Save admin to disk """ sabnzbd.save_admin( ( self.last_update, self.grand_total, self.day_total, self.week_total, self.month_total, self.end_of_day, self.end_of_week, self.end_of_month, self.quota, self.left, self.q_time, self.timeline_total, self.article_stats_tried, self.article_stats_failed, ), BYTES_FILE_NAME, )
def _save(self): ''' Save queued newzbin bookmarks to disk ''' sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
def save(self): """ Save postproc queue """ logging.info("Saving postproc queue") sabnzbd.save_admin((POSTPROC_QUEUE_VERSION, self.history_queue), POSTPROC_QUEUE_FILE_NAME)
def save(self): if self.ratings and self.nzo_indexer_map: sabnzbd.save_admin( (self.version, self.ratings, self.nzo_indexer_map), "Rating.sab")
def save(self): sabnzbd.save_admin(self.jobs, RSS_FILE_NAME)
def save(self): """ Save dir scanner bookkeeping """ sabnzbd.save_admin((self.dirscan_dir, self.ignored, self.suspected), SCAN_FILE_NAME)
def save(self): sabnzbd.save_admin((self.version, self.ratings, self.nzo_indexer_map), RATING_FILE_NAME)
def _save(self): sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
def save(self): if self.ratings and self.nzo_indexer_map: sabnzbd.save_admin((self.version, self.ratings, self.nzo_indexer_map), "Rating.sab")