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)

This commit is contained in:
Kovid Goyal 2009-01-09 17:13:09 -08:00
parent 9e5a0331ce
commit f02c361918

View File

@ -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_()