Пример #1
0
 internal NowPlaying(RestData.NowPlaying restData)
     : base(restData)
 {
     UserName = restData.UserName ?? "";
     MinutesAgo = restData.MinutesAgo ?? -1;
     PlayerId = new SubsonicId(restData.PlayerId ?? "");
     PlayerName = restData.PlayerName ?? "";
 }
Пример #2
0
 internal NowPlaying()
     : base()
 {
     UserName = "";
     MinutesAgo = -1;
     PlayerId = new SubsonicId("");
     PlayerName = "";
 }
Пример #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;
 }
Пример #4
0
 internal Album()
 {
     Id = new SubsonicId("");
     Parent = new SubsonicId("");
     Title = "";
     Artist = "";
     IsDirectory = false;
     CoverArt = new SubsonicId("");
     UserRating = null;
     AverageRating = 0.0;
 }
Пример #5
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();
 }
Пример #6
0
 internal Playlist()
 {
     Id = new SubsonicId("");
     Name = "";
     Comment = "";
     Owner = "";
     Public = false;
     SongCount = 0;
     Duration = 0;
     Created = new DateTime();
     _allowedUsers = new List<string>();
 }
Пример #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();
 }
Пример #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>();
 }
Пример #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 ?? "";
 }
Пример #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 = "";
 }
Пример #11
0
 internal Artist(RestData.Artist restData)
 {
     Id = new SubsonicId(restData.Id ?? "");
     Name = restData.Name ?? "";
 }
Пример #12
0
 internal Artist()
 {
     Id = new SubsonicId("");
     Name = "";
 }