Skip to content

Add folder based autotagging and folder rule management in settings#444

Open
dammitjeff wants to merge 6 commits intoShaneIsrael:developfrom
dammitjeff:FolderRules
Open

Add folder based autotagging and folder rule management in settings#444
dammitjeff wants to merge 6 commits intoShaneIsrael:developfrom
dammitjeff:FolderRules

Conversation

@dammitjeff
Copy link
Contributor

@dammitjeff dammitjeff commented Feb 15, 2026

Previously, Fireshare would attempt to auto tag all game clips in a specific folder if it could link the folder to an existing game. However, it would not keep any memory of that folder for new uploads, resulting in having to manually approve game id's for new uploads, even if 50 other clips in the same folder were already marked correctly.

This PR introduces new additions to the database to better accommodate folder structures for better bulk categorization. So that:

  1. Fireshare can automatically tag new videos by what folder they're in, with no user input
  2. Users can manually change and assign game id's to folders, in case something isn't picked up correctly, or the user wants custom settings for game id's

This works off of the implication that users are organizing their game folders as instructed in the readme:

/fireshare_videos/Battlefield 6
/fireshare_videos/Palworld

This will probably require a small correction in the readme, but still really exciting.

Technical changes:
• Added FolderRule data model
• Added new migration folder_rule to database that maps to folder_path and game_id
• Added API endpoints to list, create/update, and delete folder rules (get_folder_rules, create_folder_rule, delete_folder_rule)
• Added new Folder Rules section in Settings.js . Fireshare will still automatically link folders when detected by a Library scan, and the user approves it. But will also now auto-tag that folder with its corresponding game_id, for future uploads to automatically follow. All clips within Battlefield 6 folder will automatically be marked as Game: Battlefield 6 for all existing and future uploads to that folder.
Screenshot 2026-02-14 at 4 49 00 PM

GET /api/folder-rules pulls the folders within /fireshare_videos and lists them in settings (excluding uploads), even if they do not have a FolderRule in the database. Users can then confirm a suggested game_id, or manually set a different one using GameSearch.
Users can also delete an incorrect FolderRule, or Bulk unlink an entire folder all together.
Screen Recording 2026-02-14 at 5 11 32 PM 2026-02-14 17_13_36

Regarding QOL, I really think this change will bring a much more enjoyable way to bulk categorize people's existing/new libraries in just one single page, as long as they have their directories set correctly. Like, try it, it's actually really fun lol.

This change does have a slight drawback though, users with big libraries of folders will have a lonnnnng settings page. @ShaneIsrael if you could possibly look into starting work on a tabs system for Settings.js so we can better relocate these options? That would be awesome I think.

- Implemented POST, GET, and DELETE functionality for folder rules in the API.
- Added new FolderRule model to manage folder paths and associated game IDs.
- Enhanced video scanning to auto-tag videos based on folder rules.
@ShaneIsrael
Copy link
Owner

ShaneIsrael commented Feb 15, 2026

Tabs will definitely help when I get that in but I think it will still be a bad experience for most with a large library. To fix, you should add a max height to the folder tagging section so that if you have more than 4 or 5 folders, it scrolls.

I may be able to get the settings page set up with tabs this week as I have a couple days off.

How does it handle folders with underscore notation? Would be cool if it displays underscore or dash notation as spaced and capitalized the first letter of each "word" in the folder name so the human friendly name is cleaner. i.e a folder named my-favorite-clips would be My Favorite Clips. Maybe on hover the human friendly name changes to .../my-favorite-clips/ so the use knows exactly which folder it's referring too.

Just an idea, thoughts?

@dammitjeff
Copy link
Contributor Author

Cool idea! Shouldn't be hard to implement, I'll add it in.

I do agree, it's still gonna be a lot for large libraries. However 4-5 rows seems a bit extreme for a list of folders like this. Maybe we can fit 10 before people have to scroll?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants