示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
文件: nzbqueue.py 项目: Jypy/iSABnzbd
    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)
示例#5
0
 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)
示例#6
0
    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)
示例#7
0
    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)
示例#8
0
 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,
     )
示例#9
0
 def _save(self):
     ''' Save queued newzbin bookmarks to disk '''
     sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
示例#10
0
 def save(self):
     """ Save postproc queue """
     logging.info("Saving postproc queue")
     sabnzbd.save_admin((POSTPROC_QUEUE_VERSION, self.history_queue), POSTPROC_QUEUE_FILE_NAME)
示例#11
0
文件: rating.py 项目: rivy/sabnzbd
 def save(self):
     if self.ratings and self.nzo_indexer_map:
         sabnzbd.save_admin(
             (self.version, self.ratings, self.nzo_indexer_map),
             "Rating.sab")
示例#12
0
文件: rss.py 项目: labrys/sabnzbd
 def save(self):
     sabnzbd.save_admin(self.jobs, RSS_FILE_NAME)
示例#13
0
 def save(self):
     """ Save dir scanner bookkeeping """
     sabnzbd.save_admin((self.dirscan_dir, self.ignored, self.suspected),
                        SCAN_FILE_NAME)
示例#14
0
 def save(self):
     """ Save postproc queue """
     logging.info("Saving postproc queue")
     sabnzbd.save_admin((POSTPROC_QUEUE_VERSION, self.history_queue),
                        POSTPROC_QUEUE_FILE_NAME)
示例#15
0
 def save(self):
     """ Save dir scanner bookkeeping """
     sabnzbd.save_admin((self.dirscan_dir, self.ignored, self.suspected), SCAN_FILE_NAME)
示例#16
0
文件: rss.py 项目: rivy/sabnzbd
 def save(self):
     sabnzbd.save_admin(self.jobs, RSS_FILE_NAME)
示例#17
0
 def save(self):
     sabnzbd.save_admin((self.version, self.ratings, self.nzo_indexer_map),
                        RATING_FILE_NAME)
示例#18
0
 def _save(self):
     sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
示例#19
0
 def _save(self):
     ''' Save queued newzbin bookmarks to disk '''
     sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
示例#20
0
 def save(self):
     if self.ratings and self.nzo_indexer_map:
         sabnzbd.save_admin((self.version, self.ratings, self.nzo_indexer_map), "Rating.sab")