mickstar / Zoo-For-Zotero

This is an Android app for viewing Zotero libraries.
563 stars 53 forks source link

Force re-download attachments? #130

Open contagon opened 3 years ago

contagon commented 3 years ago

Currently syncing attachments via Webdav. I'm having some issues with attachments that have been changed on other devices.

For example, if I add an annotation in zoo, re-upload, then open it on a desktop the annotation will show up. If I then delete the annotation on desktop, let it sync, refresh in zoo, and open it in zoo, the annotation remains. I'd imagine this is because the attachment was never re-downloaded in zoo.

Basically, is there anyway to force re-download an attachment in zoo? Even a way to clear all downloaded attachments would work great.

Also, thank you for all your work on this app! It's going to be a game changer for my workflow.

dkoguciuk commented 3 years ago

+1, would be lovely to have this option in UI.

I have found two workarounds: 1) Remove the app and install it again (painful) 2) Delete the cache of the Zoo for Zotero app (a bit less painful)

mickstar commented 3 years ago

Perhaps longing pressing an attachment could offer the option?

@contagon apologies for not replying, I must have missed the email.

The issue occurs because when using WebDAV changes aren't synced to the zotero servers so the app cannot detect when a file on file server has changed. I leverage the metadata file on the file server but that would add a considerable delay when opening an attachment as I would have to initiate a download file first which would take at least 500ms.

I think the desktop app uses timestamps, which might be a good approach that I will need to investigate. Sadly I have little time to devote to this project so changes may take a while.

dkoguciuk commented 3 years ago

@mickstar , just to confirm: re-downloading the document (syncing with remote server) is not working also using Zotero Account Sync as a syncing method (without WebDAV setup), right?

mickstar commented 3 years ago

Try turning on the setting "verify attachment integrity before open"

On Thu, 22 Apr 2021, 12:13 am Daniel Koguciuk, @.***> wrote:

@mickstar https://github.com/mickstar , just to confirm: re-downloading the document (syncing with remote server) is not working also using Zotero Account Sync as a syncing method (without WebDAV setup), right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mickstar/Zoo-For-Zotero/issues/130#issuecomment-824094575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAV2V4NEOTOD4IJKSFUBOTTJ3MQHANCNFSM4YWEQF5A .

dkoguciuk commented 3 years ago

Oh, right. Thank you @mickstar !

contagon commented 3 years ago

@mickstar No problem. I agree checking timestamps would be the "optimal" option, but would also be a lot more work.

I'd be completely satisfied with a simple "Redownload" or "Delete local" option. I think that'd be more than sufficient.