Ejemplo n.º 1
0
        internal LavalinkTrack(LavalinkTrackInfo info)
        {
            if (info is null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            Author          = info.Author;
            Title           = info.Title;
            Source          = info.Source;
            Duration        = info.Duration;
            IsLiveStream    = info.IsLiveStream;
            IsSeekable      = info.IsSeekable;
            TrackIdentifier = info.TrackIdentifier;
            Provider        = StreamProviderUtil.GetStreamProvider(info.Source);
        }
Ejemplo n.º 2
0
#pragma warning disable CS8618
        internal LavalinkTrack(LavalinkTrackInfo info)
#pragma warning restore CS8618
        {
            if (info is null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            Author          = info.Author;
            Title           = info.Title;
            Source          = info.Source;
            Duration        = info.Duration;
            IsLiveStream    = info.IsLiveStream;
            IsSeekable      = info.IsSeekable;
            TrackIdentifier = info.TrackIdentifier;

            Provider = info.Source is null
                ? StreamProvider.Unknown
                : StreamProviderUtil.GetStreamProvider(info.Source);
        }