diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html index 217ef6d..59956c8 100644 --- a/src/app/main/main.component.html +++ b/src/app/main/main.component.html @@ -182,7 +182,7 @@ - +

Custom playlists

diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index 6ad4260..e6cfe48 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -20,6 +20,7 @@ import { CreatePlaylistComponent } from 'app/create-playlist/create-playlist.com import { Platform } from '@angular/cdk/platform'; import { v4 as uuid } from 'uuid'; import { ArgModifierDialogComponent } from 'app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component'; +import { RecentVideosComponent } from 'app/components/recent-videos/recent-videos.component'; export let audioFilesMouseHovering = false; export let videoFilesMouseHovering = false; @@ -200,6 +201,7 @@ export class MainComponent implements OnInit { formats_loading = false; @ViewChild('urlinput', { read: ElementRef }) urlInput: ElementRef; + @ViewChild('recentVideos') recentVideos: RecentVideosComponent; @ViewChildren('audiofilecard') audioFileCards: QueryList; @ViewChildren('videofilecard') videoFileCards: QueryList; last_valid_url = ''; @@ -487,6 +489,7 @@ export class MainComponent implements OnInit { this.downloadingfile = false; if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) { // do nothing + this.reloadRecentVideos(); } else { // if download only mode, just download the file. no redirect if (forceView === false && this.downloadOnlyMode && !this.iOS) { @@ -496,6 +499,7 @@ export class MainComponent implements OnInit { } else { this.downloadAudioFile(decodeURI(name)); } + this.reloadRecentVideos(); } else { localStorage.setItem('player_navigator', this.router.url.split(';')[0]); if (is_playlist) { @@ -524,6 +528,7 @@ export class MainComponent implements OnInit { this.downloadingfile = false; if (this.multiDownloadMode && !this.downloadOnlyMode && !navigate_mode) { // do nothing + this.reloadRecentVideos(); } else { // if download only mode, just download the file. no redirect if (forceView === false && this.downloadOnlyMode) { @@ -533,6 +538,7 @@ export class MainComponent implements OnInit { } else { this.downloadVideoFile(decodeURI(name)); } + this.reloadRecentVideos(); } else { localStorage.setItem('player_navigator', this.router.url.split(';')[0]); if (is_playlist) { @@ -1161,4 +1167,10 @@ export class MainComponent implements OnInit { } }); } + + reloadRecentVideos() { + if (this.recentVideos) { + this.recentVideos.getAllFiles(); + } + } }