internal NowPlaying(RestData.NowPlaying restData) : base(restData) { UserName = restData.UserName ?? ""; MinutesAgo = restData.MinutesAgo ?? -1; PlayerId = new SubsonicId(restData.PlayerId ?? ""); PlayerName = restData.PlayerName ?? ""; }
internal NowPlaying() : base() { UserName = ""; MinutesAgo = -1; PlayerId = new SubsonicId(""); PlayerName = ""; }
internal Album(RestData.Album restData) { Id = new SubsonicId(restData.Id ?? ""); Parent = new SubsonicId(restData.Parent ?? ""); Title = restData.Title ?? ""; Artist = restData.Artist ?? ""; IsDirectory = restData.IsDir ?? false; CoverArt = new SubsonicId(restData.CoverArt ?? ""); UserRating = restData.UserRating; AverageRating = restData.AverageRating ?? 0.0; }
internal Album() { Id = new SubsonicId(""); Parent = new SubsonicId(""); Title = ""; Artist = ""; IsDirectory = false; CoverArt = new SubsonicId(""); UserRating = null; AverageRating = 0.0; }
internal Playlist(RestData.Playlist playlist) { Id = new SubsonicId(playlist.Id ?? ""); Name = playlist.Name ?? ""; Comment = playlist.Comment ?? ""; Owner = playlist.Owner ?? ""; Public = playlist.Public ?? false; SongCount = playlist.SongCount ?? 0; Duration = playlist.Duration ?? 0; Created = playlist.Created; _allowedUsers = playlist.AllowedUsers.Select(allowedUser => allowedUser.Value).ToList(); }
internal Playlist() { Id = new SubsonicId(""); Name = ""; Comment = ""; Owner = ""; Public = false; SongCount = 0; Duration = 0; Created = new DateTime(); _allowedUsers = new List<string>(); }
internal Share(RestData.Share restData) { Id = new SubsonicId(restData.Id ?? ""); Url = restData.Url; Description = restData.Description ?? ""; UserName = restData.UserName ?? ""; Created = restData.Created; LastVisited = restData.LastVisited; Expires = restData.Expires; VisitCount = restData.VisitCount ?? 0; _entries = restData.Entries.Select(entry => new Entry(entry)).ToList(); }
internal Share() { Id = new SubsonicId(""); Url = null; Description = ""; UserName = ""; Created = new DateTime(); LastVisited = new DateTime(); Expires = new DateTime(); VisitCount = 0; _entries = new List<Entry>(); }
internal Child(RestData.Child restData) { Id = new SubsonicId(restData.Id ?? ""); Parent = new SubsonicId(restData.Parent ?? ""); Title = restData.Title ?? ""; IsDirectory = restData.IsDir ?? false; Album = restData.Album ?? ""; Artist = restData.Artist ?? ""; Track = restData.Track ?? ""; Year = restData.Year ?? -1; Genre = restData.Genre ?? ""; CoverArt = new SubsonicId(restData.CoverArt ?? ""); Size = restData.Size ?? -1; ContentType = restData.ContentType ?? ""; Suffix = restData.Suffix ?? ""; TranscodedContentType = restData.TranscodedContentType ?? ""; TranscodedSuffix = restData.TranscodedSuffix ?? ""; Duration = restData.Duration ?? -1; Bitrate = restData.BitRate ?? -1; Path = restData.Path ?? ""; }
internal Child() { Id = new SubsonicId(""); Parent = new SubsonicId(""); Title = ""; IsDirectory = false; Album = ""; Artist = ""; Track = ""; Year = -1; Genre = ""; CoverArt = new SubsonicId(""); Size = -1; ContentType = ""; Suffix = ""; TranscodedContentType = ""; TranscodedSuffix = ""; Duration = -1; Bitrate = -1; Path = ""; }
internal Artist(RestData.Artist restData) { Id = new SubsonicId(restData.Id ?? ""); Name = restData.Name ?? ""; }
internal Artist() { Id = new SubsonicId(""); Name = ""; }