Add folder based autotagging and folder rule management in settings#444
Add folder based autotagging and folder rule management in settings#444dammitjeff wants to merge 6 commits intoShaneIsrael:developfrom
Conversation
- 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.
…r individual suggestions
…gn rules if neccessary
…s and creating new ones as needed
…dundant processes
|
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 Just an idea, thoughts? |
|
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? |
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:
This works off of the implication that users are organizing their game folders as instructed in the readme:
This will probably require a small correction in the readme, but still really exciting.
Technical changes:

• Added
FolderRuledata model• Added new migration
folder_ruleto database that maps tofolder_pathandgame_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 withinBattlefield 6folder will automatically be marked asGame: Battlefield 6for all existing and future uploads to that folder.GET /api/folder-rulespulls the folders within/fireshare_videosand 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 usingGameSearch.Users can also delete an incorrect FolderRule, or Bulk unlink an entire folder all together.
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.