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 = "";
 }
Example #3
0
 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;
 }
Example #4
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>();
 }
Example #7
0
 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();
 }
Example #8
0
 internal Share()
 {
     Id = new SubsonicId("");
     Url = null;
     Description = "";
     UserName = "";
     Created = new DateTime();
     LastVisited = new DateTime();
     Expires = new DateTime();
     VisitCount = 0;
     _entries = new List<Entry>();
 }
Example #9
0
 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 ?? "";
 }
Example #10
0
 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 = "";
 }
Example #11
0
 internal Artist(RestData.Artist restData)
 {
     Id = new SubsonicId(restData.Id ?? "");
     Name = restData.Name ?? "";
 }
Example #12
0
 internal Artist()
 {
     Id = new SubsonicId("");
     Name = "";
 }