All checks were successful
continuous-integration/drone/push Build is passing
25 lines
1.2 KiB
C#
25 lines
1.2 KiB
C#
using System.Web;
|
|
using CinemaLib.Webshare;
|
|
using CinemaWeb.Pages;
|
|
|
|
class Program
|
|
{
|
|
internal static Session? _webshare;
|
|
|
|
public static void Main(string[] args)
|
|
{
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
var app = builder.Build();
|
|
|
|
app.MapGet("/", new SearchPage().ExecuteAsync);
|
|
app.MapGet("/login", new LoginPage().ExecuteAsync);
|
|
app.MapPost("/login", new LoginPage().ExecuteAsync);
|
|
app.MapGet("/episodes/{id}/{title}", (string id, string title, HttpRequest req) => new EpisodesPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
|
app.MapGet("/streams/{id}/{title}", (string id, string title, HttpRequest req) => new StreamsPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
|
app.MapGet("/media/{id}/{title}", (string id, string title, HttpRequest req) => new MediaPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
|
app.MapGet("/link/{provider}/{ident}/{name}/{title}", (string provider, string ident, string name, string title, HttpRequest req) => new LinkPage(provider, HttpUtility.UrlDecode(ident), HttpUtility.UrlDecode(name), HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
|
|
|
app.Run();
|
|
}
|
|
}
|