KoboCloud icon indicating copy to clipboard operation
KoboCloud copied to clipboard

Re-downloading existing books?

Open tpet93 opened this issue 4 years ago • 4 comments

Please correct me if wrong but does the script not try to download the entire library on each update. would adding a check such as

FILE=$localFile
if [ -f "$FILE" ]; then
    echo "$FILE exists."
else 
    echo "$FILE does not exist."
fi

to getRemoteFile.sh greatly improve performance when the cloud library is very large?

tpet93 avatar Jun 17 '20 07:06 tpet93

Mmm I think that this must be a regression from when we removed the size check for existing books. I feared that something like this would happen. I will look into it.

fsantini avatar Jun 17 '20 07:06 fsantini

@fsantini Is this issue still there?

What was the issue with the file size check? Because @VPeeters suggested filesize as a solution to resolve copies of the same books from different download URL's...

groentebroer avatar May 12 '21 09:05 groentebroer

I think I checked and couldn't replicate. Curl should avoid downloading a file if it already has the right size. Maybe this happens in cases when byte ranges don't work. Another quick check would be good.

fsantini avatar May 12 '21 11:05 fsantini

Indeed, this is the -C - option https://curl.se/docs/manpage.html#-C

louisabraham avatar Mar 01 '22 17:03 louisabraham