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.41k stars 804 forks source link

[Feature] Option to search subfolders when generating galleries #3867

Open dunngitter opened 1 year ago

dunngitter commented 1 year ago

I'm working on organizing a large onlyfans library, and one thing that I am missing right now is the ability to auto-generate libraries for each performer. Right now, if you enable the automatic gallery generation feature, it will create multiple galleries per performer because many of the subfolders generated by DigitalCriminals' onlyfans scraper contain images. If, on the other hand, you leave automatic gallery generation disabled and create the .forcegallery file in the root of the performer's directory, no galleries are generated at all since all of the images are in subfolders.

I think a couple of good solutions here might be to add a setting for the automatic gallery generation feature that would make it either:

I realize both of these options may only really work well for the setup that I have (where I am adding each performer as a separate library manually), so I'm definitely open to other ideas as well.

Is something like this doable?

dunngitter commented 1 year ago

Another good solution here might be to add functionality to the manual Gallery creation to do this. When creating a gallery manually, there could be an option for a path regex to match and automatically include in the gallery. This, honestly, might be better (imo) than what I proposed in the ticket.

dunngitter commented 1 year ago

@WithoutPants do you have any thoughts on this?

WithoutPants commented 1 year ago

I don't have any simple solutions.

automatically create at most one gallery per library, and include images detected within subfolders of that library

This is a pretty niche usecase and I can't really justify adding such a feature.

enable searching subfolders for images to include in auto generated galleries when the gallery is being generated because of a .forcegallery file

This is more doable, as is the ability to set a path regex for a gallery, but at least with the current scanning algorithm, this could potentially add a pretty large overhead to image scanning, since it would need to iterate through galleries with these path regexs. However I'd still think that this would be a pretty niche usecase. This could probably be better served by creating manual galleries via a post-scan plugin or something.

dunngitter commented 1 year ago

This is a pretty niche usecase and I can't really justify adding such a feature.

can't argue with this

this could potentially add a pretty large overhead to image scanning

ahh, that's not great. What about a one-time regex when creating the gallery? So it doesn't have to run the regex every time you do a scan, but at least when initially creating a gallery it can add all of the existing regex matches?

Would it be possible/simpler to at least be able to create a gallery from a directory (and ideally it's subfolders) manually? I.e. when manually creating a gallery, be able to type a path to a dir and maybe have a checkbox for whether or not to recurse?

Right now, the workflow to do this is:

New gallery -> name it, etc. -> "add images to gallery" -> enter search term/regex/path to find relevant images -> select all -> add to gallery.

As much as I'm loving having everything organized, even I do not have the patience to manually create hundreds of galleries with the above workflow.

dunngitter commented 1 year ago

@WithoutPants any thoughts on the above?

WithoutPants commented 1 year ago

Adding regex or user-defined folder fields would imply an expectation that they would be updated during scans. I wouldn't want to implement these fields without the associated scanning behaviour. Note that I'm not rejecting the original idea out of hand, it's just that I'm personally not likely to spend the time addressing this use case - there's just too many higher priorities. If you or someone else wants to tackle this then that's fine.

I think you'd address this issue more quickly by writing (or having someone write) a plugin or script to do what you're describing.