mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
New: Enable Ratings for Albums
This commit is contained in:
parent
8bd9119954
commit
c833a6dc84
5 changed files with 8 additions and 2 deletions
|
@ -27,6 +27,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
|||
public List<MediumResource> Media { get; set; }
|
||||
public List<TrackResource> Tracks { get; set; }
|
||||
public List<ReleaseResource> Releases { get; set; }
|
||||
public RatingResource Rating { get; set; }
|
||||
public string SelectedRelease { get; set; }
|
||||
public AlbumArtistResource Artist { get; set; }
|
||||
}
|
||||
|
|
|
@ -265,6 +265,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||
album.ForeignAlbumId = resource.Id;
|
||||
album.ReleaseDate = resource.ReleaseDate;
|
||||
album.CleanTitle = Parser.Parser.CleanArtistName(album.Title);
|
||||
album.Ratings = MapRatings(resource.Rating);
|
||||
album.AlbumType = resource.Type;
|
||||
|
||||
if (resource.Images != null)
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace NzbDrone.Core.Music
|
|||
Media = new List<Medium>();
|
||||
Releases = new List<AlbumRelease>();
|
||||
CurrentRelease = new AlbumRelease();
|
||||
Ratings = new Ratings();
|
||||
}
|
||||
|
||||
public const string RELEASE_DATE_FORMAT = "yyyy-MM-dd";
|
||||
|
|
|
@ -101,6 +101,7 @@ namespace NzbDrone.Core.Music
|
|||
album.ReleaseDate = albumInfo.ReleaseDate;
|
||||
album.Duration = tuple.Item2.Sum(track => track.Duration);
|
||||
album.Releases = albumInfo.Releases;
|
||||
album.Ratings = albumInfo.Ratings;
|
||||
album.CurrentRelease = albumInfo.CurrentRelease;
|
||||
|
||||
_refreshTrackService.RefreshTrackInfo(album, tuple.Item2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue