folder
{{ item.title || item.filename }}
Channels: {{ item.playlist?.items?.length }}
diff --git a/src/app/components/recent-playlists/recent-playlists.component.ts b/src/app/components/recent-playlists/recent-playlists.component.ts
index 5bb584227..4e4b8e76a 100644
--- a/src/app/components/recent-playlists/recent-playlists.component.ts
+++ b/src/app/components/recent-playlists/recent-playlists.component.ts
@@ -11,7 +11,7 @@ export class RecentPlaylistsComponent {
@Input() playlists: Playlist[];
/** Emits on playlist selection */
- @Output() playlistClicked: EventEmitter = new EventEmitter();
+ @Output() playlistClicked: EventEmitter = new EventEmitter();
/** Emits on playlist remove click */
@Output() removeClicked: EventEmitter = new EventEmitter();
diff --git a/src/app/components/video-player/video-player.component.css b/src/app/components/video-player/video-player.component.css
index 9962dd102..e470c9ff4 100644
--- a/src/app/components/video-player/video-player.component.css
+++ b/src/app/components/video-player/video-player.component.css
@@ -1,21 +1,21 @@
#video-player {
- width: 100%;
- height: calc(100vh - 70px);
+ width: 100%;
+ height: calc(100vh - 72px);
}
.main-container {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
}
.mat-drawer-content {
- background: #000;
+ background: #000;
}
.mat-drawer {
- width: 400px;
- min-width: 400px;
+ width: 400px;
+ min-width: 400px;
}
diff --git a/src/app/components/video-player/video-player.component.ts b/src/app/components/video-player/video-player.component.ts
index 28b941b6b..da04883ba 100644
--- a/src/app/components/video-player/video-player.component.ts
+++ b/src/app/components/video-player/video-player.component.ts
@@ -37,15 +37,17 @@ export class VideoPlayerComponent implements OnInit {
*/
@ViewChild('sidenav') sideNav: MatSidenav;
+ /**
+ * Creates an instance of VideoPlayerOmponent
+ * @param channelQuery akita's channel query
+ */
constructor(private channelQuery: ChannelQuery) {}
/**
* Sets video player and subscribes to channel list from the store
*/
ngOnInit(): void {
- this.channels$ = this.channelQuery
- .selectAll()
- .pipe(map((channels) => _.groupBy(channels, 'group.title')));
+ this.channels$ = this.channelQuery.selectAll();
this.videoPlayer = document.getElementById(
'video-player'
) as HTMLVideoElement;
diff --git a/src/app/material.module.ts b/src/app/material.module.ts
index 94ef566ba..d27ebc893 100644
--- a/src/app/material.module.ts
+++ b/src/app/material.module.ts
@@ -7,6 +7,7 @@ import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSidenavModule } from '@angular/material/sidenav';
+import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSnackBarModule } from '@angular/material/snack-bar';
@@ -21,6 +22,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
MatProgressBarModule,
MatSidenavModule,
MatSnackBarModule,
+ MatTabsModule,
MatToolbarModule,
],
})
diff --git a/src/app/state/channel.model.ts b/src/app/state/channel.model.ts
index 5b54c902e..fbf01b977 100755
--- a/src/app/state/channel.model.ts
+++ b/src/app/state/channel.model.ts
@@ -11,17 +11,22 @@ export interface Channel {
group: {
title: string;
};
+ fav: boolean;
}
/**
* Creates new channel object based on the given fields
* @param params partial channel object
*/
-export function createChannel(params: Partial) {
+export function createChannel(
+ params: Partial,
+ favoritesList: string[]
+) {
return {
- id: guid(),
+ id: params.url,
name: params.name,
group: params.group,
url: params.url,
+ fav: favoritesList.includes(params.url),
} as Channel;
}
diff --git a/src/app/state/channel.query.ts b/src/app/state/channel.query.ts
index c70e66197..98ed902e3 100644
--- a/src/app/state/channel.query.ts
+++ b/src/app/state/channel.query.ts
@@ -4,9 +4,7 @@ import { ChannelStore, ChannelState } from './channel.store';
@Injectable({ providedIn: 'root' })
export class ChannelQuery extends QueryEntity {
-
- constructor(protected store: ChannelStore) {
- super(store);
- }
-
+ constructor(protected store: ChannelStore) {
+ super(store);
+ }
}
diff --git a/src/app/state/channel.store.ts b/src/app/state/channel.store.ts
index 835607d1b..6af5c49ab 100644
--- a/src/app/state/channel.store.ts
+++ b/src/app/state/channel.store.ts
@@ -2,12 +2,22 @@ import { Injectable } from '@angular/core';
import { EntityState, EntityStore, StoreConfig } from '@datorama/akita';
import { Channel } from './channel.model';
-export interface ChannelState extends EntityState {}
+export interface ChannelState extends EntityState {
+ favorites: string[];
+ playlistId: string;
+}
@Injectable({ providedIn: 'root' })
@StoreConfig({ name: 'channel', resettable: true })
export class ChannelStore extends EntityStore {
constructor() {
- super();
+ super({
+ favorites: [],
+ playlistId: '',
+ });
+ }
+
+ setChannels(channels: Channel[]): void {
+ this.upsertMany(channels);
}
}
diff --git a/src/manifest.json b/src/manifest.json
index 40dfb764d..24ad61ebd 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -6,7 +6,14 @@
"version": "0.0.1",
"version_name": "0.0.1",
"icons": {
- "144": "assets/icons/icon-144x144.png"
+ "72": "assets/icons/icon-72x72.png",
+ "96": "assets/icons/icon-96x96.png",
+ "128": "assets/icons/icon-128x128.png",
+ "144": "assets/icons/icon-144x144.png",
+ "152": "assets/icons/icon-152x152.png",
+ "192": "assets/icons/icon-192x192.png",
+ "384": "assets/icons/icon-384x384.png",
+ "512": "assets/icons/icon-512x512.png"
},
"app": {
"background": {