chadalon / Studio-One-File-Finder

A cross-platform application made to update sample file locations in Studio One .song files en masse
GNU General Public License v3.0
1 stars 0 forks source link

"Best Match" option #22

Open chadalon opened 1 month ago

chadalon commented 1 month ago

Add an option to check for best matches in case sample folders contain samples with the same name. This will search the filepaths for each and see which one has more similarities (folder names) to the target. If they both have the same similarity, just choose one I suppose.

Maybe we can add another option for not adding the sample if there are no samples with ANY matching folder names in the path, just as an extra safeguard.

chadalon commented 1 month ago

Now that we're caching files beforehand, we can leverage this knowledge with our dictionary. If an unknown file type has to be searched for though we gotta search ALL directories and then find the best match. Otherwise we just see if theres only one path in our dict then we're good.

For performance: Instead of a dict of lists, maybe just set the val to an empty string or somethin if we have multiple sample locations. This will tell us we need to check a separate dictionary of lists