xtream1101 / humblebundle-downloader

Download you Humble Bundle Library
MIT License
523 stars 60 forks source link

Organize folders by title instead of by bundle #43

Open cbirdsong opened 2 years ago

cbirdsong commented 2 years ago

It would be great to have the option to not create folders for each bundle and instead create them based on the title of the thing.

Instead of Downloaded Library/Purchase Name/Item Name/downloaded_file.ext you'd just get Downloaded Library/Item Name/downloaded_file.ext.

Right now you can end up downloading the same files twice if you have the same content in multiple bundles.

denilsonsa commented 2 years ago

After downloading, I got 50 duplicate files, wasting 7.5GB (as shown by fdupes -rm .). After removing the duplicates (fdupes -rdN .), the size went down from 45GB to 38GB.

The current directory structure is wasteful: using 20% more space (and 20% more download, and 20% more time) than it would have if the directories were shallower to a single level.

greedy commented 2 years ago

Alternatively the directory layout could remain the same and the downloads could be de-duped by the sha in the library JSON. When the same file is present in other bundles/titles it could hard linked (when supported) to the first copy.

Pfeil commented 2 years ago

I'd also prefer such a flat structure and also some metadata, like checksums, day of purchase if available, the bundles it was "retrieved" by (as a replacement for the changed structure) etc. The .cache.json could be used for this (maybe renamed to hb_repository.json or so). An option to reuse already existing data downloaded to transform the "repository" fast would be nice.

darylf commented 2 years ago

I wish there was a template string naming configuration parameter. Something customizable, so we can each organize how we please.

My preference would be: "$bundle/$format/$itemName.$format"

Humble Book Bundle- Cybersecurity by Wiley/epub/Threat Modeling.epub Humble Book Bundle- Cybersecurity by Wiley/epub/Social Engineering.epub Humble Book Bundle- Cybersecurity by Wiley/pdf/Threat Modeling.pdf

SparkmanDesigns commented 2 years ago

I'm sure there's a good reason it's organized by bundle right now, but as a user I could care less about which bundle each game was a part of. I just want to see the titles. In fact in my experience, it's downright obstructive to finding anything in the directory.