Add "gameplay" hashes for multiplayer library matching - #2
Conversation
|
Found a small bug in the way the lobby library gets created, some songs have the same "soft/gameplay" hash but still don't appear. I will fix it and mark this ready for review afterwards. edit: solved |
Unsubscribe from LocalSongLibrary.BackfillBatchCompleted on disposal and add PushGameplayHashUpdate method.
Handle better the cases where either the json file is deleted or entries aren't updated.
This class handles the caching of gameplay hashes for songs, ensuring that the mapping is only computed once per song. It includes methods for retrieving and setting hashes, as well as flushing changes to disk.
Add EnsureBackfillRunning method to manage backfill process.
Ensure LocalSongLibrary backfill is running when creating or entering a lobby.
Added DumpLibraryDiff method to log differences in the lobby's song library.
Refactored local hash retrieval to use AllLocalHashes method.
Added logging for gameplay hash and local song library check before queuing a song.
|
I found a bug: it seems like not all my songs show up in the library. I have 6629 songs when scanning, but only 6108 in the library. Is this even a bug that I have introduced? 🤔 |
Removed debug logging for song queue information.
Refactor song hash handling to prioritize gameplay hash if valid.
Refactor QueueSongAsync to simplify parameters and logging.
Refactor song retrieval logic to check gameplay hash if not found.
Updated cache file naming to include hash version and added functionality to delete stale cache files.
Removed duplicate using directives and added a success toast message after background scan completion.
|
There is currently an edit in Assets/Script/Menu/MusicLibrary/MusicLibraryMenu.cs that has nothing to do with this PR. I upload the change by mistake and I will remove it. (PlayAShow Toggle) |
Refactor song entry addition to prevent duplicates and clear gameplay hash.
Log info when _currentSong is null and still update search.
Removed logging of non-matching songs and gameplay key samples.
Removed logging of lobby library updates for incoming songs.
Removed logging of lobby song library hashes in DumpLibraryDiff method.
|
"Hi! Is there any way to download a playable version of this PR? I've been trying to play online with some friends, but it barely recognizes any songs. Even when we share an exact copy between us, it still doesn't recognize them—only a few work. Thanks for your help!" |
|
@orozcohoyos123 This PR is included in my own personnal build, https://github.com/asimard1/YARG/releases Let me know how it goes :) |
Thank you! i let you know when i tried :D |
Adds soft hash support for multiplayer song matching.
This allows multiplayer lobbies to match songs based on stable song data rather than requiring identical library states, improving compatibility between players with the same songs but slightly different local metadata.
Also fixes an issue where the multiplayer library was being refreshed more often than necessary.
Changes
Related to pythonology/YARG.Core#1