Snkea / nekopaw

Automatically exported from code.google.com/p/nekopaw
1 stars 0 forks source link

Skip duplicates when downloading like grabber 1? #236

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When downloading with grabber 1, it skips duplicates when downloading.  
This is very important to me, since internet traffic matters to me and grabber 
2 will just redownload everything even if it already exists.  
Basically, I want the "if exists....skip" box behaviour from grabber 1. 

Original issue reported on code.google.com by uselr...@gmail.com on 21 Aug 2014 at 9:36

GoogleCodeExporter commented 9 years ago
I also tried adding a original_name = original_name double rule but it doesn't 
seem to do anything.  

Original comment by uselr...@gmail.com on 21 Aug 2014 at 9:39

GoogleCodeExporter commented 9 years ago
It depends.
If it's a resource with dynamic naming (i.e. you can't be sure about name until 
picture will be fully downloaded), then yes. But if name doesn't change after 
"getting list" stage, it will be skipped.

Original comment by catgirlfighter on 21 Aug 2014 at 9:44

GoogleCodeExporter commented 9 years ago
Actually, I can make skipping for g/exhentai. Just extension checking will be 
not as accurate, because sometimes pictures does have a wrong extension (jpg 
instead of png for example).

Original comment by catgirlfighter on 21 Aug 2014 at 10:17

GoogleCodeExporter commented 9 years ago
Changed script for g/exhentai a bit, get updates and try again.

Original comment by catgirlfighter on 21 Aug 2014 at 11:43

GoogleCodeExporter commented 9 years ago
Instead of the old behaviour: no skip, overwrites existing file with the same 
file, it now doesn't skip but instead creates a file that ignores my naming 
properties.  
My properties are: $rootdir$\%album%\%original_name%  
Which did create files with the original name.  
Now it creates *galleryid*-*picture number*.jpg  
For example, in my duplicate test, instead of skipping the existing 001.jpg and 
002.jpg, it created 686220-1.jpg and 686220-2.jpg
HOWEVER, the skipping for the newly created files works. On retrying, it will 
skip 686220-1.jpg and 686220-2.jpg. 
But it seems that %original_name% broke and is auto-replaced by $fname$.  

Original comment by uselr...@gmail.com on 21 Aug 2014 at 1:19

GoogleCodeExporter commented 9 years ago
Yep, analyzed is some further and the skipping works perfectly, but the naming 
broke even though I didn't change anything about the naming from before the 
update to after.  
It can't pull %original_name% from the same exhentai gallery it could just a 
few hours ago.  

Original comment by uselr...@gmail.com on 21 Aug 2014 at 1:22

GoogleCodeExporter commented 9 years ago
It does read the original_name field correctly after generating a list, but 
doesn't use it when creating a file.  

Original comment by uselr...@gmail.com on 21 Aug 2014 at 1:25

GoogleCodeExporter commented 9 years ago
I'll check it now.

Original comment by catgirlfighter on 21 Aug 2014 at 1:30

GoogleCodeExporter commented 9 years ago
Updated again. Try it.

Original comment by catgirlfighter on 21 Aug 2014 at 2:05

GoogleCodeExporter commented 9 years ago
Yes, now both things work perfectly, thanks a lot.  
(I do think grabber 1 was faster when checking for already existing images, but 
that's not very important)

Original comment by uselr...@gmail.com on 21 Aug 2014 at 2:56

GoogleCodeExporter commented 9 years ago
>I do think grabber 1 was faster
Yeah, graber 1 was simpler in many ways (inclduing codewriting), that's why it 
wasn't able to do many things as well.

Original comment by catgirlfighter on 21 Aug 2014 at 3:05