mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 03:02:56 +08:00
Added osu.ppy.sh/ss (screenshot) URL handling and calculate ID at assignment so it's not on click anymore
This commit is contained in:
parent
a839d0e91d
commit
bf97f8b1b1
@ -107,10 +107,13 @@ namespace osu.Game.Graphics.Sprites
|
||||
}
|
||||
|
||||
url = url.Substring(osuUrlIndex + 11);
|
||||
var id = getIdFromUrl(url);
|
||||
if (url.StartsWith("s/") || url.StartsWith("beatmapsets/") || url.StartsWith("d/"))
|
||||
content.Action = () => beatmapSetOverlay.ShowBeatmapSet(getIdFromUrl(url));
|
||||
content.Action = () => beatmapSetOverlay.ShowBeatmapSet(id);
|
||||
else if (url.StartsWith("b/") || url.StartsWith("beatmaps/"))
|
||||
content.Action = () => beatmapSetOverlay.ShowBeatmap(getIdFromUrl(url));
|
||||
content.Action = () => beatmapSetOverlay.ShowBeatmap(id);
|
||||
else if (url.StartsWith("ss/"))
|
||||
content.Action = () => Process.Start($"https://osu.ppy.sh/{url}");
|
||||
}
|
||||
else
|
||||
content.Action = () => Process.Start(url);
|
||||
|
Loading…
Reference in New Issue
Block a user