From 984e990103f31c701b33ac178c656c7c1e10abd4 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Tue, 8 Jun 2021 16:32:35 -0600 Subject: [PATCH] Fixed issue where categories could not be viewed --- .../components/custom-playlists/custom-playlists.component.ts | 4 +++- src/app/player/player.component.html | 2 +- src/app/player/player.component.ts | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/components/custom-playlists/custom-playlists.component.ts b/src/app/components/custom-playlists/custom-playlists.component.ts index 3914586..6071d3d 100644 --- a/src/app/components/custom-playlists/custom-playlists.component.ts +++ b/src/app/components/custom-playlists/custom-playlists.component.ts @@ -59,7 +59,9 @@ export class CustomPlaylistsComponent implements OnInit { this.downloadPlaylist(playlist.id, playlist.name); } else { localStorage.setItem('player_navigator', this.router.url); - this.router.navigate(['/player', {playlist_id: playlistID, auto: playlist.auto}]); + const routeParams = {playlist_id: playlistID}; + if (playlist.auto) { routeParams['auto'] = playlist.auto; } + this.router.navigate(['/player', routeParams]); } } else { // playlist not found diff --git a/src/app/player/player.component.html b/src/app/player/player.component.html index fc8dbac..a908e73 100644 --- a/src/app/player/player.component.html +++ b/src/app/player/player.component.html @@ -29,7 +29,7 @@
- + diff --git a/src/app/player/player.component.ts b/src/app/player/player.component.ts index d30669a..0d319ab 100644 --- a/src/app/player/player.component.ts +++ b/src/app/player/player.component.ts @@ -45,6 +45,7 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy { subPlaylist = null; uuid = null; // used for sharing in multi-user mode, uuid is the user that downloaded the video timestamp = null; + auto = null; db_playlist = null; db_file = null; @@ -82,6 +83,7 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy { this.name = this.route.snapshot.paramMap.get('name'); this.uuid = this.route.snapshot.paramMap.get('uuid'); this.timestamp = this.route.snapshot.paramMap.get('timestamp'); + this.auto = this.route.snapshot.paramMap.get('auto'); // loading config if (this.postsService.initialized) {