kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 55 forks source link

Allow bookmarks to apply to new versions of a title #1037

Closed kelson42 closed 5 months ago

kelson42 commented 6 months ago

Bookmarks apply to a book: a specific ZIM file identified via its UUID. The problem is:

We need a way for the user to easily re-apply its bookmarks to the latest version of the title. This operation will be called the "bookmark reconciliation".

Reconciliation requirements:

kelson42 commented 6 months ago

I propose to do like following:

kelson42 commented 6 months ago

@veloman-yunkan @mgautierfr Do you agree with the proposal, do you want to patch it?

rgaudin commented 6 months ago

This is a Book/Title/Book reconciliation proposal, not a bookmark one. If it only re-conciliates ZIM files, then the API should not mention bookmark.

Doing more bookmark-related operations (such as checking whether the bookmark path still exists and what not) would require ZIM file access so a very differently scoped API.

kelson42 commented 6 months ago

This is a Book/Title/Book reconciliation proposal, not a bookmark one. If it only re-conciliates ZIM files, then the API should not mention bookmark.

Kind of agree! reconciliateBookmarks(source UUID, target UUID) still makes sense, but might be based on a reconciliateBooks(...) which would handle the smart part based on metadata. Would that be a better?

rgaudin commented 6 months ago

Exactly