本文整理汇总了Python中sabnzbd.save_admin函数的典型用法代码示例。如果您正苦于以下问题:Python save_admin函数的具体用法?Python save_admin怎么用?Python save_admin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了save_admin函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: save
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)
示例2: save
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: save
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)
示例4: save
def save(self):
""" Save postproc queue """
logging.info("Saving postproc queue")
sabnzbd.save_admin((POSTPROC_QUEUE_VERSION, self.history_queue), POSTPROC_QUEUE_FILE_NAME)
示例5: save
def save(self):
sabnzbd.save_admin(self.jobs, RSS_FILE_NAME)
示例6: save
def save(self):
""" Save dir scanner bookkeeping """
sabnzbd.save_admin((self.dirscan_dir, self.ignored, self.suspected), SCAN_FILE_NAME)
示例7: _save
def _save(self):
''' Save queued newzbin bookmarks to disk '''
sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
示例8: _save
def _save(self):
sabnzbd.save_admin(self.bookmarks, BOOKMARK_FILE_NAME)
示例9: save
def save(self):
if self.ratings and self.nzo_indexer_map:
sabnzbd.save_admin((self.version, self.ratings, self.nzo_indexer_map), "Rating.sab")