stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.31k stars 799 forks source link

[Feature] Semantic FUSE filesystem to mount organised version of contents of library in host filesystem #1385

Open acccelerated opened 3 years ago

acccelerated commented 3 years ago

Is your feature request related to a problem? Please describe. I'd like my files to be tidy and navigable on my filesystem but I don't want Stash to make destructive edits to my files.

Describe the solution you'd like I'd like to see a semantic FUSE filesystem implemented in Stash.

I feel a bit gauche making a feature request that's "I want this thing from this other software in your software" but I've not seen it in anything else. I use a tool which in addition to its main use offers this feature for music files it manages. The tool is made for and only compatible with a private community but the code is open source under MIT, also happens to be written in Go, and available to view here.

Here's the author describing the feature:

Varroa can serve a read-only semantic FUSE filesystem that can be mounted in an existing empty folder. It will automatically organize and let you explore releases using the metadata retrieved with Varroa.

The mount point will display:

    artists/
    format/
    record labels/
    source/
    tags/
    years/

Going down in the folder tree, you might get:

    artists/
        Artist A/
            Album A/
                Track1.flac
                ...
        Artist B/
            ...
    record labels/
        Something something Records/
            Artist A/
                Album A/
                    Track1.flac
                    ...
            ...
        Something Else Records/
            ...
    years/
        2016/
            Artist A/
                Album A/
                    Track1.flac
                    ...
        2017/
            ...
    tags/
        indie.rock/
            Artist A/
                Album A/
                    Track1.flac
                    ...
        ambient/
            ...

This means you might find the same release through different paths in the filesystem. For example, a release that has a main artist and a guest artist, and has metadata about year of release, record label and two tags, will have 10 different valid paths leading to it.

This feature only uses tracker metadata, and does not read file tags.

SMB or FTP access to the mounted filesystem would enable a Stash-lite consumption experience in best-in-class native apps on any platform in situations where a web browser might be impractical, suboptimal or impossible. SmartTV/STB is the most obvious use case but I can conceive of others. A mounted filesystem provides a single point of flexible, open-ended compatibility that will accommodate many niche or fringe use cases that fall outside of the browser/API but beyond Explorer/Finder/Nautilus in general.

I would love to see something similar in Stash.

Describe alternatives you've considered

884

This will be suitable for some users in some situations but one thing I like about Stash is that it does not seem at all interested in moving, editing, renaming or in any way altering my files. "Have a messy folder of files with incredible metadata" is perfect but people do want or need to have tidy folders on the filesystem. This approach obviates the need to actually interfere with files on the disk to provide that.

Explaining why metadata is superior to hierarchical directories to users of and contributors to Stash seems redundant. As desirable as tidy, browsable folders on the filesystem are many libraries are an awkward-at-best fit with conventional hierarchical directories even if Stash did rename their files. This approach is 'best of both worlds' way to give users tidy folders seamlessly integrating the power of Stash's metadata and excelling what would be possible with even the most tedious-to-maintain folders and hard link regime.

WithoutPants commented 3 years ago

I've been wanting to implement something like this for a long time. Definitely on my radar.

laurus-lx commented 3 years ago

Would love to see this implemented as well. Might be able to help, as I've been looking for a Go project to contribute.