fix file playback

This commit is contained in:
Tim Müller 2022-03-31 18:37:35 +02:00
parent e5d3f6935d
commit 85dbbd8bfc
2 changed files with 4 additions and 2 deletions

@ -20,7 +20,7 @@ namespace TomatenMusic.Music.Entitites
public IEnumerable<string> 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:

@ -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);