mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Further simplify import messaging
This commit is contained in:
@ -145,8 +145,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
var downloadNotification = new DownloadNotification
|
var downloadNotification = new DownloadNotification
|
||||||
{
|
{
|
||||||
CompletionText = $"Imported {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}!",
|
Text = $"Downloading {beatmapSetInfo}",
|
||||||
Text = $"Downloading {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var request = new DownloadBeatmapSetRequest(beatmapSetInfo, noVideo);
|
var request = new DownloadBeatmapSetRequest(beatmapSetInfo, noVideo);
|
||||||
|
@ -139,6 +139,8 @@ namespace osu.Game.Database
|
|||||||
notification.Progress = 0;
|
notification.Progress = 0;
|
||||||
notification.Text = "Import is initialising...";
|
notification.Text = "Import is initialising...";
|
||||||
|
|
||||||
|
var term = $"{typeof(TModel).Name.Replace("Info", "").ToLower()}";
|
||||||
|
|
||||||
List<TModel> imported = new List<TModel>();
|
List<TModel> imported = new List<TModel>();
|
||||||
|
|
||||||
int current = 0;
|
int current = 0;
|
||||||
@ -150,7 +152,18 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
notification.Text = $"Importing ({++current} of {paths.Length})\n{Path.GetFileName(path)}";
|
var text = $"Importing ";
|
||||||
|
|
||||||
|
if (path.Length > 1)
|
||||||
|
text += $"{++current} of {paths.Length} {term}s..";
|
||||||
|
else
|
||||||
|
text += $"{term}..";
|
||||||
|
|
||||||
|
// only show the filename if it isn't a temporary one (as those look ugly).
|
||||||
|
if (!path.Contains(Path.GetTempPath()))
|
||||||
|
text += $"\n{Path.GetFileName(path)}";
|
||||||
|
|
||||||
|
notification.Text = text;
|
||||||
|
|
||||||
imported.Add(Import(path));
|
imported.Add(Import(path));
|
||||||
|
|
||||||
@ -172,7 +185,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
notification.CompletionText = imported.Count == 1
|
notification.CompletionText = imported.Count == 1
|
||||||
? $"Imported {imported.First()}!"
|
? $"Imported {imported.First()}!"
|
||||||
: $"Imported {current} {typeof(TModel).Name.Replace("Info", "").ToLower()}s!";
|
: $"Imported {current} {term}s!";
|
||||||
|
|
||||||
if (imported.Count > 0 && PresentImport != null)
|
if (imported.Count > 0 && PresentImport != null)
|
||||||
{
|
{
|
||||||
|
@ -275,7 +275,7 @@ namespace osu.Game
|
|||||||
Beatmap.Value.Mods.Value = databasedScoreInfo.Mods;
|
Beatmap.Value.Mods.Value = databasedScoreInfo.Mods;
|
||||||
|
|
||||||
menuScreen.Push(new PlayerLoader(() => new ReplayPlayer(databasedScore)));
|
menuScreen.Push(new PlayerLoader(() => new ReplayPlayer(databasedScore)));
|
||||||
}, $"watch {databasedScoreInfo.User.Username} play {databasedScoreInfo.Beatmap}", bypassScreenAllowChecks: true);
|
}, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate performFromMainMenuTask;
|
private ScheduledDelegate performFromMainMenuTask;
|
||||||
|
@ -158,5 +158,7 @@ namespace osu.Game.Scoring
|
|||||||
{
|
{
|
||||||
public string Acronym { get; set; }
|
public string Acronym { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{User} playing {Beatmap}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user