public async override Task <bool> CheckIfAvailable()
        {
            var newtrack = new SoundCloudTrack {
                SoundCloudID = ((ApiResult)Result).id
            };

            try
            {
                using (var x = await newtrack.GetSoundSource())
                {
                    _soundSourceInfo = SoundSourceInfo.FromSoundSource(x);
                    return(true);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #2
0
        public override async Task <bool> CheckIfAvailable()
        {
            var result = new YouTubeTrack {
                YouTubeId = YouTubeTrack.GetYouTubeIdFromLink(Url)
            };

            try
            {
                using (var x = await result.GetSoundSource())
                {
                    _soundSourceInfo = SoundSourceInfo.FromSoundSource(x);
                    return(true);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }