evilhero / mylar

An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
GNU General Public License v3.0
977 stars 172 forks source link

[Feature request] To not rescan the whole comic when metatagging an issue #1596

Closed yongbi85 closed 4 years ago

yongbi85 commented 7 years ago

Hello,

I'm wondering if it would be possible when doing metadata to not rescan the whole folder between each issue ? It is very stressfull for the hard drives, it would be much better i think to just rescan at the end when all metadatas have been updated (and also would take less time especially on big comic series like The Amazing Spider Man 1963)

Thanks for your work again

evilhero commented 7 years ago

The only problem is that the filename will change in some cases (going from cbr to cbz), and in doing so without the file-checker being run after each tag it would mark the given issues as Archived since it could no longer find the original file. The only thing it's doing every time is just listing the directory - so I don't think it's causing any uncessary I/O operations against the file system.

But I do agree, metatagging an entire series if it's a decent size will take extra time due to the repeating of the file-checking process when it probably could go at the end of the sequence. I'll have to look into this abit more to see what can be done, as I don't want to implement something only to cause additional problems so I'll need to do some testing and such...

yongbi85 commented 7 years ago

I don't know python sadly but it could go like with some temp table. Initial scan --> grab all file names in the folder and store them in the base with a status like 'to do' --> metatag first issue --> change status to 'doné --> metatag next issue where status ='to do' --> and so on and at the end ---> rescan directory --> drop or truncate the temp table.

I have no idea how it is currently implemented so i have no idea how much work it would be tho. And as you said in another topic you might have the comic vine api issue with doing a comic with 800 issues lile the amazing spiderman if the process is too fast...

For information for metatagging the amazing spiderman, it takes approximately 5-6 hours atm with non ssd drives

yongbi85 commented 7 years ago

My bad with 650 comics in the folder(whole series but annual) it takes about 20 hours. It tags one comic every 2 minutes.