using System.Threading; using MediaBrowser.Controller.Configuration; using System.Collections.Generic; using MediaBrowser.Controller.Entities; using System; using MediaBrowser.Model.Logging; namespace MediaBrowser.Controller.Providers { class FanArtProviderException : ApplicationException { public FanArtProviderException(string msg) : base(msg) { } } /// /// Class FanartBaseProvider /// public abstract class FanartBaseProvider : BaseMetadataProvider { protected static readonly SemaphoreSlim FanArtResourcePool = new SemaphoreSlim(5,5); /// /// The LOG o_ FILE /// protected const string LOGO_FILE = "logo.png"; /// /// The AR t_ FILE /// protected const string ART_FILE = "clearart.png"; /// /// The THUM b_ FILE /// protected const string THUMB_FILE = "thumb.jpg"; /// /// The DIS c_ FILE /// protected const string DISC_FILE = "disc.png"; /// /// The BANNE r_ FILE /// protected const string BANNER_FILE = "banner.png"; /// /// The Backdrop /// protected const string BACKDROP_FILE = "backdrop.jpg"; /// /// The Primary image /// protected const string PRIMARY_FILE = "folder.jpg"; /// /// The API key /// protected const string APIKey = "5c6b04c68e904cfed1e6cbc9a9e683d4"; protected FanartBaseProvider(ILogManager logManager, IServerConfigurationManager configurationManager) : base(logManager, configurationManager) { } /// /// Gets a value indicating whether [requires internet]. /// /// true if [requires internet]; otherwise, false. public override bool RequiresInternet { get { return true; } } /// /// Gets the priority. /// /// The priority. public override MetadataProviderPriority Priority { get { return MetadataProviderPriority.Third; } } #region Result Objects protected class FanArtImageInfo { public string id { get; set; } public string url { get; set; } public string likes { get; set; } } protected class FanArtMusicInfo { public string mbid_id { get; set; } public List musiclogo { get; set; } public List artistbackground { get; set; } public List artistthumb { get; set; } public List hdmusiclogo { get; set; } public List musicbanner { get; set; } } protected class FanArtMusicResult { public FanArtMusicInfo result { get; set; } } #endregion } }