mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Initial Commit
This commit is contained in:
commit
74ac3bb599
106 changed files with 118079 additions and 0 deletions
48
NzbDrone.Web/Global.asax.cs
Normal file
48
NzbDrone.Web/Global.asax.cs
Normal file
|
@ -0,0 +1,48 @@
|
|||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using log4net;
|
||||
using Ninject;
|
||||
using Ninject.Web.Mvc;
|
||||
using NzbDrone.Core;
|
||||
|
||||
|
||||
namespace NzbDrone.Web
|
||||
{
|
||||
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
|
||||
// visit http://go.microsoft.com/?LinkId=9394801
|
||||
|
||||
public class MvcApplication : NinjectHttpApplication
|
||||
{
|
||||
private StandardKernel _kernel;
|
||||
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
routes.IgnoreRoute("{*robotstxt}", new { robotstxt = @"(.*/)?robots.txt(/.*)?" });
|
||||
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
|
||||
|
||||
routes.MapRoute(
|
||||
"Default", // Route name
|
||||
"{controller}/{action}/{id}", // URL with parameters
|
||||
new { controller = "Series", action = "Index", id = UrlParameter.Optional } // Parameter defaults
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnApplicationStarted()
|
||||
{
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
RegisterRoutes(RouteTable.Routes);
|
||||
base.OnApplicationStarted();
|
||||
}
|
||||
|
||||
protected override IKernel CreateKernel()
|
||||
{
|
||||
_kernel = new StandardKernel();
|
||||
Main.BindKernel(_kernel);
|
||||
return _kernel;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue