bs-manager icon indicating copy to clipboard operation
bs-manager copied to clipboard

[FEAT.] : Cleanup duplicate songs

Open f1amy opened this issue 1 year ago • 4 comments

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 image The last one that shows all leaderboard info image

f1amy avatar Sep 29 '24 13:09 f1amy

I play on Windows btw, not sure if OS is relevant here

f1amy avatar Sep 29 '24 14:09 f1amy

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 avatar Sep 29 '24 15:09 silentrald

@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

Zagrios avatar Sep 29 '24 15:09 Zagrios

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

  1. same name with (1) at the end
  2. one is hash (song name - mappers), second hash (mappers - song name)
  3. same as 2. but song name or mappers are truncated
  4. 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

f1amy avatar Sep 29 '24 16:09 f1amy