1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 07:22:54 +08:00

Fix scores not using correct filename/display strings

I've updated all cases where we should have been using
`GetDisplayString()` anyway, but left the `ToString()` implementations
in place for safety. They should probably be removed in the future.
This commit is contained in:
Dean Herbert 2022-01-13 16:56:09 +09:00
parent 93c78253d6
commit c61419dfe5
3 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,7 @@ namespace osu.Game.Database
/// <param name="item">The item to export.</param>
public void Export(TModel item)
{
string filename = $"{item.ToString().GetValidArchiveContentFilename()}{FileExtension}";
string filename = $"{item.GetDisplayString().GetValidArchiveContentFilename()}{FileExtension}";
using (var stream = exportStorage.GetStream(filename, FileAccess.Write, FileMode.Create))
ExportModelTo(item, stream);

View File

@ -274,5 +274,7 @@ namespace osu.Game.Scoring
}
#endregion
public override string ToString() => this.GetDisplayTitle();
}
}

View File

@ -169,7 +169,7 @@ namespace osu.Game.Stores
else
{
notification.CompletionText = imported.Count == 1
? $"Imported {imported.First()}!"
? $"Imported {imported.First().GetDisplayString()}!"
: $"Imported {imported.Count} {HumanisedModelName}s!";
if (imported.Count > 0 && PostImport != null)