2017-09-18 03:20:36 +00:00
|
|
|
using NzbDrone.Common.Extensions;
|
2017-06-18 02:27:01 +00:00
|
|
|
using NzbDrone.Core.Datastore;
|
2017-04-20 23:19:47 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Music
|
|
|
|
{
|
2017-06-13 02:02:17 +00:00
|
|
|
public class Album : ModelBase
|
2017-04-20 23:19:47 +00:00
|
|
|
{
|
|
|
|
public Album()
|
|
|
|
{
|
2017-11-16 02:24:33 +00:00
|
|
|
Genres = new List<string>();
|
2017-04-20 23:19:47 +00:00
|
|
|
Images = new List<MediaCover.MediaCover>();
|
2017-11-16 02:24:33 +00:00
|
|
|
Media = new List<Medium>();
|
2018-01-22 04:22:12 +00:00
|
|
|
Releases = new List<AlbumRelease>();
|
2018-01-28 06:27:33 +00:00
|
|
|
CurrentRelease = new AlbumRelease();
|
2018-04-08 06:48:34 +00:00
|
|
|
Ratings = new Ratings();
|
2017-04-20 23:19:47 +00:00
|
|
|
}
|
|
|
|
|
2017-06-28 02:25:51 +00:00
|
|
|
public const string RELEASE_DATE_FORMAT = "yyyy-MM-dd";
|
|
|
|
|
2017-06-18 02:27:01 +00:00
|
|
|
public string ForeignAlbumId { get; set; }
|
|
|
|
public int ArtistId { get; set; }
|
2017-06-25 13:17:49 +00:00
|
|
|
public string Title { get; set; }
|
2017-06-18 02:27:01 +00:00
|
|
|
public string CleanTitle { get; set; }
|
2017-06-28 02:25:51 +00:00
|
|
|
public DateTime? ReleaseDate { get; set; }
|
2017-09-18 03:20:36 +00:00
|
|
|
public List<string> Label { get; set; }
|
2017-06-25 13:17:49 +00:00
|
|
|
public int ProfileId { get; set; }
|
2017-08-14 02:58:42 +00:00
|
|
|
public int Duration { get; set; }
|
2017-05-07 19:55:49 +00:00
|
|
|
public List<Track> Tracks { get; set; }
|
2017-04-20 23:19:47 +00:00
|
|
|
public bool Monitored { get; set; }
|
|
|
|
public List<MediaCover.MediaCover> Images { get; set; }
|
2017-04-30 16:34:53 +00:00
|
|
|
public List<string> Genres { get; set; }
|
2017-11-16 02:24:33 +00:00
|
|
|
public List<Medium> Media { get; set; }
|
2017-07-03 18:39:06 +00:00
|
|
|
public DateTime? LastInfoSync { get; set; }
|
|
|
|
public DateTime? LastDiskSync { get; set; }
|
|
|
|
public DateTime Added { get; set; }
|
2017-11-16 02:24:33 +00:00
|
|
|
public String AlbumType { get; set; }
|
2017-11-26 03:51:37 +00:00
|
|
|
public List<SecondaryAlbumType> SecondaryTypes { get; set; }
|
2017-06-18 02:27:01 +00:00
|
|
|
//public string ArtworkUrl { get; set; }
|
|
|
|
//public string Explicitness { get; set; }
|
2017-10-18 02:55:02 +00:00
|
|
|
public AddArtistOptions AddOptions { get; set; }
|
2017-06-25 13:17:49 +00:00
|
|
|
public Artist Artist { get; set; }
|
|
|
|
public Ratings Ratings { get; set; }
|
2018-01-18 02:28:47 +00:00
|
|
|
public List<AlbumRelease> Releases { get; set; }
|
|
|
|
public AlbumRelease CurrentRelease { get; set; }
|
2017-06-18 02:27:01 +00:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
return string.Format("[{0}][{1}]", ForeignAlbumId, Title.NullSafe());
|
|
|
|
}
|
2018-01-18 02:28:47 +00:00
|
|
|
|
|
|
|
public void ApplyChanges(Album otherAlbum)
|
|
|
|
{
|
|
|
|
|
|
|
|
ForeignAlbumId = otherAlbum.ForeignAlbumId;
|
|
|
|
|
|
|
|
Tracks = otherAlbum.Tracks;
|
|
|
|
|
|
|
|
ProfileId = otherAlbum.ProfileId;
|
|
|
|
AddOptions = otherAlbum.AddOptions;
|
|
|
|
Monitored = otherAlbum.Monitored;
|
|
|
|
CurrentRelease = otherAlbum.CurrentRelease;
|
|
|
|
|
|
|
|
}
|
2017-04-20 23:19:47 +00:00
|
|
|
}
|
|
|
|
}
|