shiori icon indicating copy to clipboard operation
shiori copied to clipboard

Save hasEbook, hasArchive, etc... in database

Open Monirzadeh opened this issue 1 year ago • 2 comments

In this specific situation, we call directly bookmark from database. So we don't get any specific parameter from request or current run (like has. Archive or hasEbook) and we don't save that parameter on database (legacy code). This parameter defines each time you open homepage of shiori If browser, just open /bookmark/:id/ebook file should be present to the browser regardless of request, as it should be.(just check user access). If my explain is a little confusing, please look at this part https://github.com/go-shiori/shiori/blob/e839b6987580b750103304258ac8385f1163de08/internal/webserver/handler-api.go#L201C1-L214C3 If it is not a concern right now, we can set resolve and decide about that in #497 if not, do you have any idea as better handle that? Same thing happen in archive and content but it on #497 and keep commit related to feature.

Originally posted by @Monirzadeh in https://github.com/go-shiori/shiori/pull/623#discussion_r1250691272

If users remove the file from disk manually, should we update the value in the database automatically, or it should be something just in dev mode?

Monirzadeh avatar Jul 23 '23 10:07 Monirzadeh