Skip to content

Commit

Permalink
1.34.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kinsi55 committed Dec 13, 2023
1 parent 7301279 commit c94b61e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
10 changes: 9 additions & 1 deletion BetterSongSearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,15 @@
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatmapCore.dll</HintPath>
</Reference>
<Reference Include="BeatSaberPlaylistsLib">
<HintPath>E:\SteamLibrary\steamapps\common\Beat Saber\Libs\BeatSaberPlaylistsLib.dll</HintPath>
<HintPath>$(BeatSaberDir)\Libs\BeatSaberPlaylistsLib.dll</HintPath>
</Reference>
<Reference Include="BGLib.AppFlow">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BGLib.UnityExtension">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BSML">
<HintPath>$(BeatSaberDir)\Plugins\BSML.dll</HintPath>
Expand Down
9 changes: 5 additions & 4 deletions UI/BSSFlowCoordinator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ public static Dictionary<string, Dictionary<string, float>> songsWithScores {
songsWithScoresShouldProbablyUpdate = false;

foreach(var x in playerDataModel.playerData.levelsStatsData) {
if(!x.validScore || x.highScore == 0 || x.levelID.Length < 13 + 40 || !x.levelID.StartsWith("custom_level_", StringComparison.Ordinal))
var lid = x.Key.songId;
if(!x.Value.validScore || x.Value.highScore == 0 || lid.Length < 13 + 40 || !lid.StartsWith("custom_level_", StringComparison.Ordinal))
continue;

var sh = x.levelID.Substring(13, 40);
var sh = lid.Substring(13, 40);

SongDetailsCache.Structs.Song song;
// local score level id's can be scuffed if you pass custom levels w/ no songcore installed
Expand All @@ -53,7 +54,7 @@ public static Dictionary<string, Dictionary<string, float>> songsWithScores {
continue;
} catch { continue; }

if(!song.GetDifficulty(out var diff, (SongDetailsCache.Structs.MapDifficulty)x.difficulty))
if(!song.GetDifficulty(out var diff, (SongDetailsCache.Structs.MapDifficulty)x.Key.difficulty))
continue;

if(!_songsWithScores.TryGetValue(sh, out var h))
Expand All @@ -65,7 +66,7 @@ public static Dictionary<string, Dictionary<string, float>> songsWithScores {
*/
//var maxScore = ScoreModel.MaxRawScoreForNumberOfNotes((int)diff.notes);
//h[$"{x.beatmapCharacteristic.serializedName}_{x.difficulty}"] = (x.highScore * 100f) / maxScore;
h[$"{x.beatmapCharacteristic.serializedName}_{x.difficulty}"] = 0;
h[$"{x.Key.characteristic.serializedName}_{x.Key.difficulty}"] = 0;
}
}

Expand Down
5 changes: 3 additions & 2 deletions UI/SelectedSongView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ await Task.WhenAll(new[] {
var h = song.GetCustomLevelIdString();

var preview = beatmapLevelsModel?.GetLevelPreviewForLevelId(h);
if(preview != null) try {
levelCollectionViewController?.SongPlayerCrossfadeToLevelAsync(preview);
try {
if(preview != null)
levelCollectionViewController?.SongPlayerCrossfadeToLevelAsync(preview);
coverImage.sprite = await SongCore.Loader.CustomLevels.Values.FirstOrDefault(x => x.levelID == h)?.GetCoverImageAsync(songAssetLoadCanceller.Token);
} catch { }
}
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"id": "BetterSongSearch",
"name": "BetterSongSearch",
"author": "Kinsi55",
"version": "0.7.84",
"version": "0.7.85",
"description": "Search and download songs with a lot of filtering and sorting options and without frustration!",
"gameVersion": "1.19.0",
"gameVersion": "1.34.2",
"dependsOn": {
"BSIPA": "^4.0.5",
"BeatSaberMarkupLanguage": "^1.5.3",
Expand Down

0 comments on commit c94b61e

Please sign in to comment.