reverted back 01private's changes

added 1 for avatars
This commit is contained in:
samvaio 2016-12-15 01:20:37 +05:30 committed by GitHub
parent 3674512073
commit 07962f9e2e
2 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ namespace NadekoBot.Modules.Music.Classes
public string Query { get; set; }
public string Title { get; set; }
public string Uri { get; set; }
public string AlbumArt { get; set; }
}
public class Song
{
@ -319,6 +320,7 @@ namespace NadekoBot.Modules.Music.Classes
Uri = svideo.StreamLink,
ProviderType = musicType,
Query = svideo.TrackLink,
AlbumArt = svideo.artwork_url,
})
{ TotalLength = TimeSpan.FromMilliseconds(svideo.Duration) };
}
@ -333,6 +335,7 @@ namespace NadekoBot.Modules.Music.Classes
Uri = svideo.StreamLink,
ProviderType = MusicType.Normal,
Query = svideo.TrackLink,
AlbumArt = svideo.artwork_url,
})
{ TotalLength = TimeSpan.FromMilliseconds(svideo.Duration) };
}

View File

@ -73,6 +73,7 @@ namespace NadekoBot.Modules.Music.Classes
public int Duration { get; set; }
[JsonProperty("permalink_url")]
public string TrackLink { get; set; } = "";
public string artwork_url { get; set; } = "";
[JsonIgnore]
public string StreamLink => $"https://api.soundcloud.com/tracks/{Id}/stream?client_id={NadekoBot.Credentials.SoundCloudClientId}";
}