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);
      }
    }
Example #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);
		}
Example #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);
 }
Example #4
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServerV4.Remove(module);
   _httpServerV6.Remove(module);
 }
Example #5
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServerV4.Add(module);
   _httpServerV6.Add(module);
 }
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Remove(module));
 }
 public void AddHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Add(module));
 }