mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Merge branch 'master' into import-stable-scores
This commit is contained in:
@ -178,20 +178,23 @@ namespace osu.Game.Beatmaps
|
|||||||
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
||||||
return DefaultBeatmap;
|
return DefaultBeatmap;
|
||||||
|
|
||||||
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
lock (workingCache)
|
||||||
|
{
|
||||||
|
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||||
|
|
||||||
if (cached != null)
|
if (cached != null)
|
||||||
return cached;
|
return cached;
|
||||||
|
|
||||||
if (beatmapInfo.Metadata == null)
|
if (beatmapInfo.Metadata == null)
|
||||||
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
||||||
|
|
||||||
WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
|
WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
|
||||||
|
|
||||||
previous?.TransferTo(working);
|
previous?.TransferTo(working);
|
||||||
workingCache.Add(working);
|
workingCache.Add(working);
|
||||||
|
|
||||||
return working;
|
return working;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -114,7 +114,8 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
lock (imported)
|
lock (imported)
|
||||||
{
|
{
|
||||||
imported.Add(model);
|
if (model != null)
|
||||||
|
imported.Add(model);
|
||||||
current++;
|
current++;
|
||||||
|
|
||||||
notification.Text = $"Imported {current} of {paths.Length} {HumanisedModelName}s";
|
notification.Text = $"Imported {current} of {paths.Length} {HumanisedModelName}s";
|
||||||
@ -140,7 +141,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
notification.CompletionText = imported.Count == 1
|
notification.CompletionText = imported.Count == 1
|
||||||
? $"Imported {imported.First()}!"
|
? $"Imported {imported.First()}!"
|
||||||
: $"Imported {current} {HumanisedModelName}s!";
|
: $"Imported {imported.Count} {HumanisedModelName}s!";
|
||||||
|
|
||||||
if (imported.Count > 0 && PresentImport != null)
|
if (imported.Count > 0 && PresentImport != null)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +69,6 @@ namespace osu.Game.Scoring
|
|||||||
|
|
||||||
protected override ArchiveDownloadRequest<ScoreInfo> CreateDownloadRequest(ScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score);
|
protected override ArchiveDownloadRequest<ScoreInfo> CreateDownloadRequest(ScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score);
|
||||||
|
|
||||||
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.OnlineScoreID == model.OnlineScoreID);
|
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.OnlineScoreID == model.OnlineScoreID && s.Files.Any());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,11 +86,7 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
if (replayAvailability == ReplayAvailability.NotAvailable)
|
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
|
||||||
{
|
|
||||||
button.Enabled.Value = false;
|
|
||||||
button.Alpha = 0.6f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum ReplayAvailability
|
private enum ReplayAvailability
|
||||||
|
Reference in New Issue
Block a user