[FEAT.] : Cleanup duplicate songs
Problem
Playing BS with custom songs for a long time created a problem of having downloaded multiple copies of the same maps, which probably happened when using different installation methods (BSManager and ModAssistant, for example). Some of the copies could be outdated map versions, but that's a whole another issue.
In the game this results in showing multiple instances of the same song when searching, with only one of them showing correct leaderboards (BeatLeader, might be their bug tho).
Solution
The way I see it, there could be a button in BSManager to cleanup/normalize downloaded songs in BSManager/SharedContent/SharedMaps/CustomLevels.
It could read each song's short ID, name, artists from the metadata and remove redundant copies.
Additional context
Don't know if playing this map will result in score upload since it does not show map ranked status
The last one that shows all leaderboard info
I play on Windows btw, not sure if OS is relevant here
Are the folder names of duplicate maps/songs patterned like this:
id-song
id-song (2)
id-song (3)
Or are they very different to one another?
Also the labeler just tagged this as linux because it found "arch" in the word "searching" probably.
@silentrald I don't think that matters. One map can be named cleanly and still be duplicated in a folder named AAAAAA 😅
We can just scan for duplicate hashes
I'll take this one; I've already done some work on it but never pushed it
Are the folder names of duplicate maps/songs patterned like this:
id-song id-song (2) id-song (3)Or are they very different to one another?
I'll add for the context these were the patterns
- same name with
(1)at the end - one is
hash (song name - mappers), secondhash (mappers - song name) - same as 2. but song name or mappers are truncated
- one is as from 2. and truncated, second is in some other format, like
hash-full song name from beat saver, like[Chroma+] Bad Side - Jake Daniels
there might be other patterns