diff --git a/src/app/components/recent-videos/recent-videos.component.html b/src/app/components/recent-videos/recent-videos.component.html
index 47fd083..f4a6f23 100644
--- a/src/app/components/recent-videos/recent-videos.component.html
+++ b/src/app/components/recent-videos/recent-videos.component.html
@@ -25,7 +25,7 @@
- @for (filter of fileFilters | keyvalue: originalOrder; track filter) {
+ @for (filter of fileFilters | keyvalue: originalOrder; track filter.key) {
{{filter.value.label}}
}
@@ -38,9 +38,9 @@
@if (normal_files_received && paged_data) {
- @for (file of paged_data; track file; let i = $index) {
+ @for (file of paged_data; track file.uid; let i = $index) {
-
+
@if (downloading_content[file.uid]) {
}
@@ -54,7 +54,7 @@
}
- @for (file of loading_files; track file; let i = $index) {
+ @for (file of loading_files; track $index; let i = $index) {
@@ -84,7 +84,7 @@
@if (selected_data.length) {
- @for (file of (reverse_order ? selected_data_objs.slice().reverse() : selected_data_objs); track file; let i = $index) {
+ @for (file of (reverse_order ? selected_data_objs.slice().reverse() : selected_data_objs); track file.uid; let i = $index) {
}
@@ -98,7 +98,7 @@
@if (normal_files_received) {
- @for (file of paged_data; track file) {
+ @for (file of paged_data; track file.uid) {
@@ -116,7 +116,7 @@
@if (!normal_files_received && loading_files && loading_files.length > 0) {
@if (!normal_files_received) {
- @for (file of paged_data; track file) {
+ @for (file of paged_data; track $index) {
diff --git a/src/app/components/recent-videos/recent-videos.component.ts b/src/app/components/recent-videos/recent-videos.component.ts
index 58965de..69d02f6 100644
--- a/src/app/components/recent-videos/recent-videos.component.ts
+++ b/src/app/components/recent-videos/recent-videos.component.ts
@@ -115,15 +115,16 @@ export class RecentVideosComponent implements OnInit {
if (this.postsService.initialized) {
this.getAllFiles();
this.getAllPlaylists();
+ } else {
+ const initSub = this.postsService.service_initialized.subscribe(init => {
+ if (init) {
+ this.getAllFiles();
+ this.getAllPlaylists();
+ initSub.unsubscribe();
+ }
+ });
}
- this.postsService.service_initialized.subscribe(init => {
- if (init) {
- this.getAllFiles();
- this.getAllPlaylists();
- }
- });
-
this.postsService.files_changed.subscribe(changed => {
if (changed) {
this.getAllFiles();
diff --git a/src/app/components/unified-file-card/unified-file-card.component.html b/src/app/components/unified-file-card/unified-file-card.component.html
index 38b8fe4..63569ad 100644
--- a/src/app/components/unified-file-card/unified-file-card.component.html
+++ b/src/app/components/unified-file-card/unified-file-card.component.html
@@ -46,7 +46,7 @@
}
playlist_add Add to playlist
- @for (playlist of availablePlaylists; track playlist) {
+ @for (playlist of availablePlaylists; track playlist.id) {
@if ((playlist.type === 'audio') === file_obj.isAudio) {
{{playlist.name}}
}
diff --git a/src/app/components/unified-file-card/unified-file-card.component.ts b/src/app/components/unified-file-card/unified-file-card.component.ts
index 8a39091..9a2ba57 100644
--- a/src/app/components/unified-file-card/unified-file-card.component.ts
+++ b/src/app/components/unified-file-card/unified-file-card.component.ts
@@ -50,6 +50,7 @@ export class UnifiedFileCardComponent implements OnInit {
@Input() locale = null;
@Input() baseStreamPath = null;
@Input() jwtString = null;
+ @Input() apiKeyString = null;
@Input() availablePlaylists = null;
@Output() goToFile = new EventEmitter();
@Output() toggleFavorite = new EventEmitter();
@@ -77,7 +78,13 @@ export class UnifiedFileCardComponent implements OnInit {
}
if (this.file_obj && this.file_obj.thumbnailPath) {
- this.thumbnailBlobURL = `${this.baseStreamPath}thumbnail/${encodeURIComponent(this.file_obj.thumbnailPath)}?jwt=${this.jwtString}`;
+ let authQuery = '';
+ if (this.jwtString) {
+ authQuery = `jwt=${this.jwtString}`;
+ } else if (this.apiKeyString) {
+ authQuery = `apiKey=${this.apiKeyString}`;
+ }
+ this.thumbnailBlobURL = `${this.baseStreamPath}thumbnail/${encodeURIComponent(this.file_obj.thumbnailPath)}${authQuery ? '?' + authQuery : ''}`;
}
if (this.file_obj) this.streamURL = this.generateStreamURL();
@@ -140,6 +147,8 @@ export class UnifiedFileCardComponent implements OnInit {
let fullLocation = this.baseStreamPath + baseLocation + `?test=test&uid=${this.file_obj['uid']}`;
if (this.jwtString) {
fullLocation += `&jwt=${this.jwtString}`;
+ } else if (this.apiKeyString) {
+ fullLocation += `&apiKey=${this.apiKeyString}`;
}
fullLocation += '&t=,10';
diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html
index 4b68695..68742ef 100644
--- a/src/app/main/main.component.html
+++ b/src/app/main/main.component.html
@@ -25,7 +25,7 @@
Best
@if (url && cachedAvailableFormats && cachedAvailableFormats[url]?.formats && !cachedAvailableFormats[url]?.formats_failed) {
- @for (option of cachedAvailableFormats[url]['formats'][audioOnly ? 'audio' : 'video']; track option) {
+ @for (option of cachedAvailableFormats[url]['formats'][audioOnly ? 'audio' : 'video']; track option.key) {
@if (option.key !== 'best_audio_format') {
{{option.key}}
@@ -34,7 +34,7 @@
}
}
@if (url && cachedAvailableFormats && cachedAvailableFormats[url]?.formats_failed) {
- @for (option of qualityOptions[audioOnly ? 'audio' : 'video']; track option) {
+ @for (option of qualityOptions[audioOnly ? 'audio' : 'video']; track option.value) {
{{option.label}}
@@ -53,7 +53,7 @@
@if (results_showing) {
- @for (result of results; track result; let i = $index) {
+ @for (result of results; track result.videoUrl; let i = $index) {
1) ? 'first-result-card' : '', ((i === results.length-1) && results.length > 1) ? 'last-result-card' : '', (results.length === 1) ? 'only-result-card' : '']">
diff --git a/src/app/player/player.component.html b/src/app/player/player.component.html
index b9747f4..d88c18c 100644
--- a/src/app/player/player.component.html
+++ b/src/app/player/player.component.html
@@ -8,7 +8,7 @@
@if (postsService['config']['API']['use_sponsorblock_API'] && api && playlist?.length > 0 && playlist[currentIndex]['type'] === 'video/mp4') {
-
+
}
@@ -69,21 +69,21 @@
- @for (playlist_item of playlist; track playlist_item; let i = $index) {
+ @for (playlist_item of playlist; track (playlist_item.uid ?? playlist_item.url ?? $index); let i = $index) {
{{playlist_item.label}}
}
- @if (db_file && api && postsService.config) {
-
+ @if (db_file && api && api.time && postsService.config) {
+
}
@if (api_ready && db_file && db_file.url.includes('twitch.tv')) {
-
+
}
-}
\ No newline at end of file
+}
diff --git a/src/app/player/player.component.ts b/src/app/player/player.component.ts
index a173fab..3bcb47d 100644
--- a/src/app/player/player.component.ts
+++ b/src/app/player/player.component.ts
@@ -204,6 +204,8 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
if (this.postsService.isLoggedIn) {
fullLocation += `&jwt=${this.postsService.token}`;
+ } else if (this.postsService.auth_token) {
+ fullLocation += `&apiKey=${this.postsService.auth_token}`;
}
if (this.uuid) {