2013-03-29 23:00:38 +00:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace NzbDrone.Api.Frontend
|
|
|
|
{
|
|
|
|
public class StaticResourceMapper : IMapHttpRequestsToDisk
|
|
|
|
{
|
|
|
|
public string Map(string resourceUrl)
|
|
|
|
{
|
|
|
|
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
|
|
|
|
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
|
|
|
|
|
|
|
|
|
2013-05-03 05:42:18 +00:00
|
|
|
return Path.Combine("ui", path);
|
2013-03-29 23:00:38 +00:00
|
|
|
}
|
2013-05-17 03:03:52 +00:00
|
|
|
|
|
|
|
public RequestType IHandle { get { return RequestType.StaticResources; } }
|
2013-03-29 23:00:38 +00:00
|
|
|
}
|
|
|
|
}
|