OliverHaag / pocketbook-apps

Apps for PocketBook Readers
GNU General Public License v3.0
16 stars 4 forks source link

Allways Keine aktualisierten Dateien gefunden #2

Open WST1811 opened 3 years ago

WST1811 commented 3 years ago

Hello,

thanks for this app. ;) I try to get it working, no luck. My PB641 is a Aqua2 with Firmware 5.20 from 20190604.

# Configuration for NextCloud app
export USER="ich"
export PASSWORD="1234"
export REMOTE_HOST="https://host.domain.tld"
export REMOTE_PATH_SUFFIX="/nextcloud/remote.php/dav"
export REMOTE_DIR_NAME="Buecher"

The Nextcloud Server is Version 20.7. The directory Buecher ist on the NC-Server and on the Aqua2 in the root. One Book is in Buecher on the Server, Buecher on the PB741 is empty. I can set a wrong passwort, i get: Keine aktualisierten Dateien. This is the WebDAV Link i get from Server:

https://host.domain.tld/nextcloud/remote.php/dav/files/Ich/

What i'm doing wrong?

Thanks and Regards Winfried

ghost commented 3 years ago

Hi!

I'm having the same problem. My setup is a bit different because I'm using Seafile, not Nextcloud. But the Webdav protocol should be the same. What I've found is that the line below return empty:

# Gets a list of all remote file d:response tags
REMOTE_FILES_TAGS=$(curl --silent --user "$USER":"$PASSWORD" "$REMOTE_DIR_URL" -X PROPFIND -H 'Depth:infinity' --data '<?xml version="1.0"?><a:propfind xmlns:a="DAV:"><a:prop><a:resourcetype /><a:getlastmodified /></a:prop></a:propfind>' | sed -n 's/<d:multistatus[^>]*>\(.*\)<\/d:multistatus>/\1/p' | sed 's/<\/d:response><d:response>/<\/d:response>\n<d:response>/g' | grep '<d:resourcetype/>')

In my case, it's because all the d's (<d:resourcetype/>, <d:response>...) should be uppercase (<D:resourcetype/>, <D:response>...). This returns a list with the tags of all files in my server. However, I'm still getting "No updated files found.".

I'll make a fork and see if I can get it to work.

Kr, kepair

WST1811 commented 3 years ago

I have found an alternative that works for me and does what it is supposed to. https://github.com/JuanJakobo/Pocketbook-Nextcloud-Client/releases/tag/0.62 @kepair Try the App fromJuanJakobo, maybe it work for your. ;)

OliverHaag commented 3 years ago

Hi all, hard to tell what's going wrong on your end. Probably the linked app is a bit more portable, the one here runs fine with my reader and server but if the webdav responses are slightly different it may break since I'm not doing any real xml parsing.