show filter initialisation

This commit is contained in:
2022-09-12 22:44:40 +02:00
parent 5bb3766845
commit 43d2297b27
10 changed files with 2801 additions and 2486 deletions

View File

@@ -51,7 +51,9 @@ export class RemoteComponent {
private textRenderingService: TextRenderingService,
private globalSettingsService: GlobalSettingsService
) {
this.shows$ = showService.list$(true).pipe(map(_ => _.sort((a, b) => (b.date < a.date ? -1 : b.date > a.date ? 1 : 0))));
this.shows$ = showService
.list$(true)
.pipe(map(_ => _.filter(_ => _.date.toDate() > new Date(new Date().setMonth(new Date().getMonth() - 1))).sort((a, b) => (b.date < a.date ? -1 : b.date > a.date ? 1 : 0))));
songService.list$().subscribe(_ => (this.songs = _));
globalSettingsService.get$