bsq-ports / BetterSongSearchQuest

Search and download songs with a lot of filtering and sorting options in Beat Saber
MIT License
20 stars 5 forks source link

SongList: reworked search logic #24

Closed f1nzer closed 2 months ago

f1nzer commented 7 months ago

Firstly, thank you for the fantastic mod!

I'm not proficient in C++, and I'm an absolute noob in quest mod development, but here's my attempt to enhance the search functionality. Currently, it performs poorly and most of the time it is nearly impossible to find songs by artists or by song name, in my opinion. Also, from time to time, there are some random results at the top.

I checked the algorithm and was a bit surprised with a woogabooga logic. The scoring was calculated based on some questionable conditions. Additionally, I believe sorting shouldn't impact the scoring at all; it should only reorder entries that were filtered previously (by ignoring any scores retrieved before).

Better song search for the BetterSongSearchQuest!

So, here are the changes I made:

I understand that this is a port of the desktop mod version, and I'm not sure if it's okay to change the logic to be completely different from how it was implemented there.

Anyway, please try the new logic locally and let me know if it really works better than before or not (at least now I can find songs 😄)

fixes https://github.com/bsq-ports/BetterSongSearchQuest/issues/17

offtop: I'm facing an issue with the ./copy.ps1 script on windows (quest3):

adb: error: failed to copy 'build/libBetterSongSearch.so' to '/sdcard/Android/data/com.beatgames.beatsaber/files/mods/libBetterSongSearch.so': remote fchown failed: Operation not permitted
build/libBetterSongSearch.so: 1 file pushed, 0 skipped. 136.2 MB/s (8060032 bytes in 0.056s)
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.beatgames.beatsaber/com.unity3d.player.UnityPlayerActivity }
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.beatgames.beatsaber/com.unity3d.player.UnityPlayerActivity }
Warning: Activity not started, intent has been delivered to currently running top-most instance.

Maybe you know how to resolve the issue with the failed copy operation? The mod is disabled after this. Instead of this, I am currently building the qmod file and patching via QuestPatcher.

FrozenAlex commented 7 months ago

For now we are in the process of porting BSS to 1.34.2, some of your suggestions will make it into the final release but I feel like the search becomes a bit too simple. Can't really test it right now though cause I don't have 1.28.0. You can join the efforts by joining BSMG server. Quest version development chat is in quest-mod-dev channel

FrozenAlex commented 2 months ago

I decided that this search search algorithm does not really fit the mod, I want the ranking to be as close to the PC version as possible. I will be looking into making it better, it seems like the original algo port just has some bugs that need to be addressed. Sorry for the long delay on the decision. For now I am closing this pull request.