Пример #1
0
        /// <summary>
        /// Song Constructor to download files
        /// </summary>
        /// <param name="link"></param>
        /// <param name="requester"></param>
        /// <param name="youtubeDL"></param>
        /// <param name="getaudiodata"></param>
        public async static Task <SongDataContainer> CreateNewContainer(string link, string requester, YoutubeDL youtubeDL, bool getaudiodata = false)
        {
            SongDataContainer container = new SongDataContainer()
            {
                Link = link,
                OriginalRequester = requester,
                LocalFile         = false
            };

            if (youtubeDL == null)
            {
                return(container);
            }

            await container.GetYouTubeVideoInformation(youtubeDL);

            if (getaudiodata && container.PingValid)
            {
                await container.GetYouTubeAudioData(youtubeDL);
            }

            return(container);
        }
Пример #2
0
 public TwitchRequestedSong(SongDataContainer Song, string requester)
 {
     SongData  = Song;
     Requester = requester;
 }