From db6deddbd275b310ec1e961d0e7378ac68af5c86 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 2 Sep 2019 23:17:57 +0200 Subject: [PATCH] Preparing the api for watch calls. --- Kyoo/ClientApp/src/app/app-routing.module.ts | 4 +-- Kyoo/ClientApp/src/app/app.component.html | 2 +- .../src/app/browse/browse.component.html | 2 +- .../episodes-list.component.html | 2 +- .../episodes-list/episodes-list.component.ts | 1 + .../src/app/player/player.component.ts | 8 ++++- .../app/services/stream-resolver.service.ts | 8 ++--- .../show-details/show-details.component.html | 2 +- Kyoo/Controllers/EpisodesController.cs | 8 ++--- Kyoo/Controllers/WatchController.cs | 35 +++++++++++++++++++ 10 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 Kyoo/Controllers/WatchController.cs diff --git a/Kyoo/ClientApp/src/app/app-routing.module.ts b/Kyoo/ClientApp/src/app/app-routing.module.ts index baa8e162..67153c0e 100644 --- a/Kyoo/ClientApp/src/app/app-routing.module.ts +++ b/Kyoo/ClientApp/src/app/app-routing.module.ts @@ -13,8 +13,8 @@ import { StreamResolverService } from "./services/stream-resolver.service"; const routes: Routes = [ { path: "browse", component: BrowseComponent, pathMatch: "full", resolve: { shows: LibraryResolverService } }, { path: "browse/:library-slug", component: BrowseComponent, resolve: { shows: LibraryResolverService } }, - { path: "shows/:show-slug", component: ShowDetailsComponent, resolve: { show: ShowResolverService } }, - { path: "watch/:show-slug/s:season-number/e:episode-number", component: PlayerComponent, resolve: { show: StreamResolverService } }, + { path: "show/:show-slug", component: ShowDetailsComponent, resolve: { show: ShowResolverService } }, + { path: "watch/:item", component: PlayerComponent, resolve: { show: StreamResolverService } }, { path: "**", component: NotFoundComponent } ]; diff --git a/Kyoo/ClientApp/src/app/app.component.html b/Kyoo/ClientApp/src/app/app.component.html index 831ca6cd..c161b81f 100644 --- a/Kyoo/ClientApp/src/app/app.component.html +++ b/Kyoo/ClientApp/src/app/app.component.html @@ -1,4 +1,4 @@ -
+