0"
- (click)="getPlaylist('GLOBAL_FAVORITES')"
+ (click)="getGlobalFavorites()"
>
star
@@ -32,7 +32,7 @@
[item]="item"
[showActions]="!sidebarMode"
(editPlaylistClicked)="openInfoDialog($event)"
- (playlistClicked)="getPlaylist($event)"
+ (playlistClicked)="getPlaylist(item)"
(refreshClicked)="refreshPlaylist($event)"
(removeClicked)="removeClicked($event)"
>
diff --git a/src/app/home/recent-playlists/recent-playlists.component.ts b/src/app/home/recent-playlists/recent-playlists.component.ts
index 5e3a97491..19d0ef55d 100644
--- a/src/app/home/recent-playlists/recent-playlists.component.ts
+++ b/src/app/home/recent-playlists/recent-playlists.component.ts
@@ -13,6 +13,7 @@ import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { TranslateService } from '@ngx-translate/core';
import { map } from 'rxjs';
+import { GLOBAL_FAVORITES_PLAYLIST_ID } from '../../../../shared/constants';
import { IpcCommand } from '../../../../shared/ipc-command.class';
import { Playlist } from '../../../../shared/playlist.interface';
import { DataService } from '../../services/data.service';
@@ -160,9 +161,18 @@ export class RecentPlaylistsComponent implements OnDestroy {
);
}
- getPlaylist(playlistId: string): void {
- this.router.navigate(['playlists', playlistId]);
- this.playlistClicked.emit(playlistId);
+ getGlobalFavorites() {
+ this.router.navigate(['playlists', GLOBAL_FAVORITES_PLAYLIST_ID]);
+ this.playlistClicked.emit(GLOBAL_FAVORITES_PLAYLIST_ID);
+ }
+
+ getPlaylist(playlistMeta: PlaylistMeta): void {
+ if (playlistMeta.serverUrl) {
+ this.router.navigate(['xtreams', playlistMeta._id]);
+ } else {
+ this.router.navigate(['playlists', playlistMeta._id]);
+ this.playlistClicked.emit(playlistMeta._id);
+ }
}
/**