| | | 1 | | #nullable disable |
| | | 2 | | |
| | | 3 | | using System; |
| | | 4 | | using System.Collections.Generic; |
| | | 5 | | using MediaBrowser.Common.Configuration; |
| | | 6 | | using MediaBrowser.Common.Plugins; |
| | | 7 | | using MediaBrowser.Model.Plugins; |
| | | 8 | | using MediaBrowser.Model.Serialization; |
| | | 9 | | using MediaBrowser.Providers.Plugins.StudioImages.Configuration; |
| | | 10 | | |
| | | 11 | | namespace MediaBrowser.Providers.Plugins.StudioImages |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// Artwork Plugin class. |
| | | 15 | | /// </summary> |
| | | 16 | | public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages |
| | | 17 | | { |
| | | 18 | | /// <summary> |
| | | 19 | | /// Artwork repository URL. |
| | | 20 | | /// </summary> |
| | | 21 | | public const string DefaultServer = "https://raw.githubusercontent.com/jellyfin/emby-artwork/master/studios"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Initializes a new instance of the <see cref="Plugin"/> class. |
| | | 25 | | /// </summary> |
| | | 26 | | /// <param name="applicationPaths">application paths.</param> |
| | | 27 | | /// <param name="xmlSerializer">xml serializer.</param> |
| | | 28 | | public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) |
| | 21 | 29 | | : base(applicationPaths, xmlSerializer) |
| | | 30 | | { |
| | 21 | 31 | | Instance = this; |
| | 21 | 32 | | } |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Gets the instance of Artwork plugin. |
| | | 36 | | /// </summary> |
| | | 37 | | public static Plugin Instance { get; private set; } |
| | | 38 | | |
| | | 39 | | /// <inheritdoc/> |
| | 24 | 40 | | public override Guid Id => new Guid("872a7849-1171-458d-a6fb-3de3d442ad30"); |
| | | 41 | | |
| | | 42 | | /// <inheritdoc/> |
| | 29 | 43 | | public override string Name => "Studio Images"; |
| | | 44 | | |
| | | 45 | | /// <inheritdoc/> |
| | 1 | 46 | | public override string Description => "Get artwork for studios from any Jellyfin-compatible repository."; |
| | | 47 | | |
| | | 48 | | // TODO remove when plugin removed from server. |
| | | 49 | | |
| | | 50 | | /// <inheritdoc/> |
| | 1 | 51 | | public override string ConfigurationFileName => "Jellyfin.Plugin.StudioImages.xml"; |
| | | 52 | | |
| | | 53 | | /// <inheritdoc/> |
| | | 54 | | public IEnumerable<PluginPageInfo> GetPages() |
| | | 55 | | { |
| | | 56 | | yield return new PluginPageInfo |
| | | 57 | | { |
| | | 58 | | Name = Name, |
| | | 59 | | EmbeddedResourcePath = GetType().Namespace + ".Configuration.config.html" |
| | | 60 | | }; |
| | | 61 | | } |
| | | 62 | | } |
| | | 63 | | } |