mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Switched to MEF to register http handlers
This commit is contained in:
parent
a95e868300
commit
93b42641d2
@@ -1,13 +1,21 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Model.Weather;
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
[Export(typeof(BaseHandler))]
|
||||
class WeatherHandler : BaseSerializationHandler<WeatherInfo>
|
||||
{
|
||||
public override bool HandlesRequest(HttpListenerRequest request)
|
||||
{
|
||||
return ApiService.IsApiUrlMatch("weather", request);
|
||||
}
|
||||
|
||||
protected override Task<WeatherInfo> GetObjectToSerialize()
|
||||
{
|
||||
// If a specific zip code was requested on the query string, use that. Otherwise use the value from configuration
|
||||
|
||||
Reference in New Issue
Block a user