dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
735 stars 139 forks source link

Library export import function #1490

Closed gamebeaker closed 2 months ago

gamebeaker commented 2 months ago

@Kiradien related to #1365 #1365 I changed how the Readinglist gets updated if the book is deleted. Why? If you open WebToEpub from a not valid page example in chrome: chrome://extensions/ firefox: about:addons It wasn't possible to delete a epub. Additionally i added the deletion of the reading list of the saved books if the Library gets cleared with "Clear Library". Is that ok or did you have other reason to use .addObserver(library)?

Now the original commit: Allow the user to export/ import the current Library with reading status as json file. minor fix: the save as dialog got triggered if "Add to Library" is used on a new url -> now only triggers if the Option "Download Epubs after new Chapter got added automatically" is checked.

Kiradien commented 2 months ago

These changes are definitely a more complete / better way of handling it; I went with AddObserver because it was the first method that came to mind to access the object, but considering the frequency "Deletion" will actually be called, reading from storage on call is a far better solution than the constant overhead.