-
Is there a way to check if a book has pending updates? I'm thinking something like One more thing, is it possible to update just the one book in the current loop iteration? I found this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can check if a book needs an update by checking For individually adding books to the update queue, check how ComicRackCE/ComicRack/Views/ComicBrowserControl.cs Lines 2725 to 2731 in c6b6bad That method calls So you could just call Something like this: #@Name QueueManager Test
#@Hook Books
def QueueManager_Test(books):
# Use the actual MainWindow instance to get the type
main_window_type = ComicRack.MainWindow.GetType()
# Get the assembly that contains MainWindow
assembly = main_window_type.Assembly
# Now get the Program type from that same assembly
program_type = assembly.GetType("cYo.Projects.ComicRack.Viewer.Program")
# Fetch QueueManager via reflection
queue_manager = program_type.GetProperty("QueueManager").GetValue(None)
for book in books:
# Now call AddBookToFileUpdate on that book
queue_manager.AddBookToFileUpdate(book, True) |
Beta Was this translation helpful? Give feedback.
You can check if a book needs an update by checking
ComicBook.ComicInfoIsDirty
, this is what triggers the orange star saying an update is needed.For individually adding books to the update queue, check how
ComicRack.MainWindow.UpdateComics
is done. It callsProgram.QueueManager.AddBookToFileUpdate
and passes the book object to it. Updating single books from the program, works the same way, it just does it on only the selected books.ComicRackCE/ComicRack/Views/ComicBrowserControl.cs
Lines 2725 to 2731 in c6b6bad