Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix videos list params

Chocobozzz5b5e333f068c
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index c18ebcf546..90a88544a6 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -54,7 +54,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
ngOnInit () {
// Subscribe to route changes
- const routeParams = this.route.snapshot.params
+ const routeParams = this.route.snapshot.queryParams
this.loadRouteParams(routeParams)
this.resizeSubscription = fromEvent(window, 'resize')
@@ -162,7 +162,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
protected setNewRouteParams () {
const routeParams = this.buildRouteParams()
- this.router.navigate([ this.currentRoute, routeParams ])
+ this.router.navigate([ this.currentRoute ], { queryParams: routeParams })
}
protected buildVideoPages () {
diff --git a/client/src/app/videos/video-list/video-search.component.ts b/client/src/app/videos/video-list/video-search.component.ts
index 67857a0a9c..b94be8e118 100644
--- a/client/src/app/videos/video-list/video-search.component.ts
+++ b/client/src/app/videos/video-list/video-search.component.ts
@@ -39,6 +39,7 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O
this.subActivatedRoute = this.route.queryParams.subscribe(
queryParams => {
const querySearch = queryParams['search']
+
if (!querySearch) return this.redirectService.redirectToHomepage()
if (this.otherRouteParams.search === querySearch) return