From f02c3619185f1b38e215c4f49dfa188eace05a5a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Jan 2009 17:13:09 -0800 Subject: [PATCH] Fix regression in news download scheduling system. If you set news to be downloaded using calibre versions before 0.4.125, all the scheduling/account information for the downloads may be lost. You have to reset the recipes for download. Sorry for the inconvenience. Fixes #1580 (News Download Duplicates & Unscheduled downloads) --- src/calibre/gui2/dialogs/scheduler.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/dialogs/scheduler.py b/src/calibre/gui2/dialogs/scheduler.py index f61c220bb9..a4bfe9f665 100644 --- a/src/calibre/gui2/dialogs/scheduler.py +++ b/src/calibre/gui2/dialogs/scheduler.py @@ -75,7 +75,13 @@ def save_recipes(recipes): def load_recipes(): config.refresh() - return [Recipe().unpickle(r) for r in config.get('scheduled_recipes', [])] + recipes = [] + for r in config.get('scheduled_recipes', []): + r = Recipe().unpickle(r) + if r.builtin and not str(r.id).startswith('recipe_'): + continue + recipes.append(r) + return recipes class RecipeModel(QAbstractListModel, SearchQueryParser): @@ -438,7 +444,7 @@ class Scheduler(QObject): self.lock.unlock() def main(args=sys.argv): - app = QApplication([]) + QApplication([]) from calibre.library.database2 import LibraryDatabase2 d = SchedulerDialog(LibraryDatabase2('/home/kovid/documents/library')) d.exec_()