public void Activated(PluginRuntime pluginRuntime)
    {
      var meta = pluginRuntime.Metadata;
      Logger.Info(string.Format("{0} v{1} [{2}] by {3}", meta.Name, meta.PluginVersion, meta.Description, meta.Author));

      IResourceServer server = ServiceRegistration.Get<IResourceServer>();
      if (server != null)
      {
        ServiceRegistration.Set<IFanArtService>(new FanArtService());
        _fanartModule = new FanartAccessModule();
        server.AddHttpModule(_fanartModule);
      }
    }
Esempio n. 2
0
		/// <summary>
		/// Add a <see cref="HttpModule"/> to the server.
		/// </summary>
		/// <param name="module">mode to add</param>
		public void Add(HttpModule module)
		{
			_modules.Add(module);
		}
Esempio n. 3
0
 /// <summary>
 /// Removes a <see cref="HttpModule"/> from the server.
 /// </summary>
 /// <param name="module">Module to remove.</param>
 // Added by Albert, Team-MediaPortal: It must be possible to remove modules at runtime.
 public void Remove(HttpModule module)
 {
   _modules.Remove(module);
 }
Esempio n. 4
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServerV4.Remove(module);
   _httpServerV6.Remove(module);
 }
Esempio n. 5
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServerV4.Add(module);
   _httpServerV6.Add(module);
 }
Esempio n. 6
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Remove(module));
 }
Esempio n. 7
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Add(module));
 }