diff --git a/TomatenMusicCore/Music/Entitites/FullTrackContext.cs b/TomatenMusicCore/Music/Entitites/FullTrackContext.cs index 03e6b19..4250914 100644 --- a/TomatenMusicCore/Music/Entitites/FullTrackContext.cs +++ b/TomatenMusicCore/Music/Entitites/FullTrackContext.cs @@ -20,7 +20,7 @@ namespace TomatenMusic.Music.Entitites public IEnumerable YoutubeTags { get; set; } public ulong YoutubeViews { get; set; } public ulong YoutubeLikes { get; set; } - public Uri YoutubeThumbnail { get; set; } + public Uri? YoutubeThumbnail { get; set; } = null; public DateTime YoutubeUploadDate { get; set; } // // Summary: diff --git a/TomatenMusicCore/Util/Common.cs b/TomatenMusicCore/Util/Common.cs index 050d5cc..478e9af 100644 --- a/TomatenMusicCore/Util/Common.cs +++ b/TomatenMusicCore/Util/Common.cs @@ -32,10 +32,12 @@ namespace TomatenMusic.Util DiscordEmbedBuilder builder = new DiscordEmbedBuilder() .WithTitle(track.Title) .WithUrl(track.Source) - .WithImageUrl(context.YoutubeThumbnail) .WithDescription(context.YoutubeDescription) .AddField("Length", Common.GetTimestamp(track.Duration), true); + if (context.YoutubeThumbnail != null) + builder.WithImageUrl(context.YoutubeThumbnail); + if (context.IsFile) { builder.WithAuthor(track.Author);