Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion osu.Game/Audio/PreviewTrackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ protected override void LoadComplete()
Logger.Log($"A {nameof(PreviewTrack)} was created without a containing {nameof(IPreviewTrackOwner)}. An owner should be added for correct behaviour.");
}

protected override Track GetTrack() => trackManager.Get($"https://b.ppy.sh/preview/{beatmapSetInfo.OnlineID}.mp3");
protected override Track GetTrack()
{
string? url = (beatmapSetInfo as IBeatmapSetOnlineInfo)?.Preview;
if (string.IsNullOrEmpty(url))
url = $"https://b.ppy.sh/preview/{beatmapSetInfo.OnlineID}.mp3";
return trackManager.Get(url);
}
}
}
}
2 changes: 1 addition & 1 deletion osu.Game/Beatmaps/IBeatmapSetOnlineInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface IBeatmapSetOnlineInfo
BeatmapSetOnlineCovers Covers { get; }

/// <summary>
/// A small sample clip of this beatmap set's song.
/// A URL containing a small sample clip of this beatmap set's song.
/// </summary>
string Preview { get; }

Expand Down
Loading