-
Notifications
You must be signed in to change notification settings - Fork 0
/
EmbySonic.Plugin.cs
82 lines (73 loc) · 2.13 KB
/
EmbySonic.Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
using EmbySonic.Configuration;
using MediaBrowser.Model.Drawing;
namespace EmbySonic
{
/// <summary>
/// Class Plugin
/// </summary>
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages, IHasThumbImage
{
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}
public static string PluginName = "Subsonic for Emby";
public IEnumerable<PluginPageInfo> GetPages()
{
return new[]
{
new PluginPageInfo
{
Name = "embysubsonic",
EmbeddedResourcePath = "EmbySonic.Configuration.configPage.html"
}
};
}
private Guid _id = new Guid("1067e341-9cea-4587-adc7-8947dccb279e");
public override Guid Id
{
get { return _id; }
}
/// <summary>
/// Gets the name of the plugin
/// </summary>
/// <value>The name.</value>
public override string Name
{
get { return PluginName; }
}
public Stream GetThumbImage()
{
var type = GetType();
return type.Assembly.GetManifestResourceStream("EmbySonic.Images.plugin.png");
}
public ImageFormat ThumbImageFormat
{
get
{
return ImageFormat.Png;
}
}
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public override string Description
{
get
{
return "Extends API to allow for Subsonic-compatible calls.";
}
}
/// <summary>
/// Gets the instance.
/// </summary>
/// <value>The instance.</value>
public static Plugin? Instance { get; private set; }
}
}