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.23k stars 793 forks source link

[Feature] Option to ignore/skip symlinks #1056

Open parasiteoflife opened 3 years ago

parasiteoflife commented 3 years ago

Is your feature request related to a problem? Please describe. I have several folders where I store all my files, those folders contain symlinks linking to a file in another one of those directories so if I were to add Folder A and then Folder B and C I will presumably end up with a lot of repeated videos. I base all of this by the fact that I've added the folder A and the app scrapped the symlinks.

Describe the solution you'd like Adding an option to skip symlinks would solve this issue.

Describe alternatives you've considered I've considered making a separated folder and store all the files as symlinks there but that will mean having to make new symlink every time I add a new file which is not ideal as a automated solution would be 1000x better.

bnkai commented 3 years ago

Even if you use symlinks only one file will be added to the database the rest will be considered duplicate because the hash will be the same when scanning. This does add a little overhead for every scan since more files will be scanned but if you use oshash it shouldnt be that much. You could add an extra _symlink_ to the filename of the symlinked files and exclude that pattern using the stash Excluded Video/Image/Gallery Patterns option.

parasiteoflife commented 3 years ago

Even if you use symlinks only one file will be added to the database the rest will be considered duplicate because the hash will be the same when scanning. This does add a little overhead for every scan since more files will be scanned but if you use oshash it shouldnt be that much.

But wont Stash show multiple entries for those duplicates?

You could add an extra _symlink_ to the filename of the symlinked files and exclude that pattern using the stash Excluded Video/Image/Gallery Patterns option.

I can't add anything to the filename because the symlinks are there representing the same file with a different filename so it doesn't get downloaded again i.e. downloading the same video from website 1 and from website 2 and replacing one of those videos with a symlink so the duplicate doesn't take up hdd space, those duplicates don't have the same title and don't have the same ID (which is included in the filename).

WithoutPants commented 3 years ago

But wont Stash show multiple entries for those duplicates?

It will not. You will get a log message indicating that the file is a duplicate. In future, I expect duplicate files to be combined under a single scene entry with multiple file locations.