public async Task <bool> LoadInformation(ApiResult result) { using (var soundSource = await GetSoundSource()) { return(LoadInformation(result, SoundSourceInfo.FromSoundSource(soundSource))); } }
public bool LoadInformation(Entry ytResult, SoundSourceInfo soundSourceInfo) { Year = (uint)DateTime.Parse(ytResult.published.Date).Year; Title = ytResult.title.Name; Artist = ytResult.author.First().name.Text; Uploader = ytResult.author.First().name.Text; kHz = soundSourceInfo.kHz; SetDuration(soundSourceInfo.Duration); return(true); }
public bool LoadInformation(ApiResult result, SoundSourceInfo soundSourceInfo) { if (!result.IsStreamable) { return(false); } Year = result.release_year != null ? uint.Parse(result.release_year.ToString()) : (uint)DateTime.Parse(result.created_at).Year; Title = result.title; ArtworkUrl = result.artwork_url != null?result.artwork_url.Replace("large.jpg", "{0}.jpg") : string.Empty; Artist = result.user.username; Genres = result.genre; SoundCloudID = result.id; Uploader = result.user.username; Downloadable = result.downloadable; kHz = soundSourceInfo.kHz; SetDuration(soundSourceInfo.Duration); return(true); }