mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 15:10:55 +03:00
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:
@@ -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) {
|
||||
|
||||
@@ -459,7 +459,7 @@ export class PostsService implements CanActivate {
|
||||
return this.http.post<SuccessObject>(this.path + 'deleteArchiveItems', body, this.httpOptions);
|
||||
}
|
||||
|
||||
getFileFormats(url) {
|
||||
getFileFormats(url: string) {
|
||||
const body: GetFileFormatsRequest = {url: url};
|
||||
return this.http.post<GetFileFormatsResponse>(this.path + 'getFileFormats', body, this.httpOptions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user