fsantini / KoboCloud

A set of scripts to synchronize a kobo reader with popular cloud services
Other
1.01k stars 97 forks source link

Re-downloading existing books? #25

Closed tpet93 closed 1 year ago

tpet93 commented 4 years ago

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?

fsantini commented 4 years ago

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.

groentebroer commented 3 years ago

@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...

fsantini commented 3 years ago

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.

louisabraham commented 2 years ago

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