mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
APIBeatmapSet.Covers
is never null
This commit is contained in:
@ -5,7 +5,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace osu.Game.Beatmaps
|
namespace osu.Game.Beatmaps
|
||||||
{
|
{
|
||||||
public class BeatmapSetOnlineCovers
|
public struct BeatmapSetOnlineCovers
|
||||||
{
|
{
|
||||||
public string CoverLowRes { get; set; }
|
public string CoverLowRes { get; set; }
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The different sizes of cover art for this beatmap set.
|
/// The different sizes of cover art for this beatmap set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BeatmapSetOnlineCovers? Covers { get; set; }
|
BeatmapSetOnlineCovers Covers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A small sample clip of this beatmap set's song.
|
/// A small sample clip of this beatmap set's song.
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public class APIBeatmapSet : BeatmapMetadata, IBeatmapSetOnlineInfo, IBeatmapSetInfo
|
public class APIBeatmapSet : BeatmapMetadata, IBeatmapSetOnlineInfo, IBeatmapSetInfo
|
||||||
{
|
{
|
||||||
[JsonProperty(@"covers")]
|
[JsonProperty(@"covers")]
|
||||||
public BeatmapSetOnlineCovers? Covers { get; set; }
|
public BeatmapSetOnlineCovers Covers { get; set; }
|
||||||
|
|
||||||
[JsonProperty(@"id")]
|
[JsonProperty(@"id")]
|
||||||
public int OnlineID { get; set; }
|
public int OnlineID { get; set; }
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
{
|
{
|
||||||
var beatmap = playlistItem?.Beatmap.Value;
|
var beatmap = playlistItem?.Beatmap.Value;
|
||||||
|
|
||||||
if (background?.BeatmapInfo?.BeatmapSet?.OnlineInfo?.Covers?.Cover == beatmap?.BeatmapSet?.OnlineInfo?.Covers?.Cover)
|
if (background?.BeatmapInfo?.BeatmapSet?.OnlineInfo?.Covers.Cover == beatmap?.BeatmapSet?.OnlineInfo?.Covers.Cover)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cancellationSource?.Cancel();
|
cancellationSource?.Cancel();
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
Texture? texture = null;
|
Texture? texture = null;
|
||||||
|
|
||||||
// prefer online cover where available.
|
// prefer online cover where available.
|
||||||
if (BeatmapInfo?.BeatmapSet?.OnlineInfo?.Covers?.Cover != null)
|
if (BeatmapInfo?.BeatmapSet?.OnlineInfo?.Covers.Cover != null)
|
||||||
texture = textures.Get(BeatmapInfo.BeatmapSet.OnlineInfo.Covers.Cover);
|
texture = textures.Get(BeatmapInfo.BeatmapSet.OnlineInfo.Covers.Cover);
|
||||||
|
|
||||||
Sprite.Texture = texture ?? beatmaps.DefaultBeatmap.Background;
|
Sprite.Texture = texture ?? beatmaps.DefaultBeatmap.Background;
|
||||||
|
Reference in New Issue
Block a user