Skip to content

Group downloaded files by purchase #6

@MayeulC

Description

@MayeulC

Original issue/proposal

Originally asked by @tobias-p in #4.

if possible, could you alter the downloader, so that everything is downloaded by bundle?

For example, I have single games bought in hb where it is ok that the downloader creates a folder called like the game, but another game within a bundle is also downloaded in just a folder called like the game itself.

For example:

bought bioshock in hb store: then download to "/destination/bioshock/..." is ok
got bioshock within a bundle: then download should go to "/destination/bundlename/bioshock/..."

this would make it easier to check out, which bundles are alreday downloaded.

Proposed implementation

The major issue I see with this if using a naive implementation, is that it would take two times as much disk space, and bandwidth to download duplicate games.
I would rather create a new folder, "by-purchase", or something like this, containing one subfolder for each purchase, and symlinks to the actual files.

Proposed organization, that just adds a "by-purchase" folder:

.
├── by-purchase
│   ├── Humble indie bundle X
│   │   ├── product01 -> ../../product01
│   │   └── product02 -> ../../product02
│   └── Humble store product 01
│       └── product01 -> ../../product01
├── product01
│   ├── audio
│   ├── linux
│   ├── mac
│   └── windows
└── product02
    ├── ebook
    ├── linux
    └── windows

See alternative trees at the end of the post.

Now, one question: symlinks, or hardlinks?

  • hardlinks remain valid when moving original files around (both the file and the link is an "original file")
  • changing content from a hardlink changes the original as well
  • symlinks can span multiple filesystems
  • symlinks are usually better understood

I have an issue with symlinks, though. On windows, as far as I know, only ntfs supports them (maybe vfat as well), and before the creators update, you had to be root/administrator to create one. Maybe we can try to do so, and fallback to .lnk if that doesn't work.

Alternative organizations:

  • group by bundle/store purchase/monthly by creating one such subfolder in by-purchase
    • Alternatively, create three top-level directories by-bundle, by-store-purchase, by-monthly
  • to avoid cluttering the top level directory, create another folder, by-product that has the current contents.

Configuration:

I would make this optional (though probably enabled by default), behind a configuration switch. When disabled, she structure should remain the current one.
This might not be easily backwards-compatible if the above feature (storing products in a by-products folder) is implemented. If so, I would probably always leave the downloads in by-product.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions