Lidarr/src/NzbDrone.Core/MediaCover/MediaCover.cs

62 lines
1.2 KiB
C#
Raw Permalink Normal View History

using System.IO;
using Equ;
using NzbDrone.Common.Extensions;
2017-09-16 20:27:38 +00:00
using NzbDrone.Core.Datastore;
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,
Headshot = 5,
Cover = 6,
2017-09-16 20:27:38 +00:00
Disc = 7,
Logo = 8,
Clearlogo = 9
}
public enum MediaCoverEntity
{
Artist = 0,
Album = 1
}
public class MediaCover : MemberwiseEquatable<MediaCover>, IEmbeddedDocument
{
private string _url;
public string Url
{
get
{
return _url;
}
set
{
_url = value;
if (Extension.IsNullOrWhiteSpace())
{
Extension = Path.GetExtension(value);
}
}
}
public MediaCoverTypes CoverType { get; set; }
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;
}
}
2017-09-16 20:27:38 +00:00
}