Fixed issue where video info could not be retrieved

If youtube-dl update fails, error will show and server won't crash
This commit is contained in:
Isaac Abadi
2023-12-03 21:22:08 -05:00
parent 6b59446a37
commit 344d959c05
4 changed files with 15 additions and 20 deletions

View File

@@ -548,7 +548,7 @@ export class MainComponent implements OnInit {
}
if (!(this.cachedAvailableFormats[url] && this.cachedAvailableFormats[url]['formats'])) {
this.cachedAvailableFormats[url]['formats_loading'] = true;
this.postsService.getFileFormats([url]).subscribe(res => {
this.postsService.getFileFormats(url).subscribe(res => {
this.cachedAvailableFormats[url]['formats_loading'] = false;
const infos = res['result'];
if (!infos || !infos.formats) {