UserPage - Lists of rated movies and tv series added
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
using WatchIt.Common.Model.Genres;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Query;
|
||||
using WatchIt.Database.Model.Media;
|
||||
@@ -30,6 +31,9 @@ public class SeriesResponse : Series, IQueryOrderable<SeriesResponse>
|
||||
|
||||
[JsonPropertyName("rating")]
|
||||
public RatingResponse Rating { get; set; }
|
||||
|
||||
[JsonPropertyName("genres")]
|
||||
public IEnumerable<GenreResponse> Genres { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -51,6 +55,7 @@ public class SeriesResponse : Series, IQueryOrderable<SeriesResponse>
|
||||
Length = mediaSeries.Media.Length;
|
||||
HasEnded = mediaSeries.HasEnded;
|
||||
Rating = RatingResponse.Create(mediaSeries.Media.RatingMedia);
|
||||
Genres = mediaSeries.Media.Genres.Select(x => new GenreResponse(x)).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user