2019-08-01 20:37:08 +00:00
|
|
|
using System.IO;
|
2019-08-27 20:23:35 +00:00
|
|
|
using Equ;
|
2020-01-03 12:49:24 +00:00
|
|
|
using NzbDrone.Common.Extensions;
|
2017-09-16 20:27:38 +00:00
|
|
|
using NzbDrone.Core.Datastore;
|
2013-03-04 05:53:02 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.MediaCover
|
|
|
|
{
|
|
|
|
public enum MediaCoverTypes
|
|
|
|
{
|
2013-03-31 21:45:16 +00:00
|
|
|
Unknown = 0,
|
|
|
|
Poster = 1,
|
|
|
|
Banner = 2,
|
2014-01-22 05:22:09 +00:00
|
|
|
Fanart = 3,
|
|
|
|
Screenshot = 4,
|
2017-06-25 13:17:49 +00:00
|
|
|
Headshot = 5,
|
|
|
|
Cover = 6,
|
2017-09-16 20:27:38 +00:00
|
|
|
Disc = 7,
|
2023-05-22 16:00:36 +00:00
|
|
|
Logo = 8,
|
2023-05-22 17:28:18 +00:00
|
|
|
Clearlogo = 9
|
2013-03-04 05:53:02 +00:00
|
|
|
}
|
|
|
|
|
2019-05-07 23:10:09 +00:00
|
|
|
public enum MediaCoverEntity
|
|
|
|
{
|
|
|
|
Artist = 0,
|
|
|
|
Album = 1
|
|
|
|
}
|
|
|
|
|
2019-08-27 20:23:35 +00:00
|
|
|
public class MediaCover : MemberwiseEquatable<MediaCover>, IEmbeddedDocument
|
2013-03-04 05:53:02 +00:00
|
|
|
{
|
2019-08-07 20:21:17 +00:00
|
|
|
private string _url;
|
|
|
|
public string Url
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return _url;
|
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
|
|
|
_url = value;
|
|
|
|
if (Extension.IsNullOrWhiteSpace())
|
|
|
|
{
|
|
|
|
Extension = Path.GetExtension(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-04 05:53:02 +00:00
|
|
|
public MediaCoverTypes CoverType { get; set; }
|
2019-08-07 20:21:17 +00:00
|
|
|
public string Extension { get; private set; }
|
2022-04-14 04:51:12 +00:00
|
|
|
public string RemoteUrl { get; set; }
|
2014-01-22 05:22:09 +00:00
|
|
|
|
|
|
|
public MediaCover()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public MediaCover(MediaCoverTypes coverType, string url)
|
|
|
|
{
|
|
|
|
CoverType = coverType;
|
|
|
|
Url = url;
|
|
|
|
}
|
2013-03-04 05:53:02 +00:00
|
|
|
}
|
2017-09-16 20:27:38 +00:00
|
|
|
}
|