mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 23:20:56 +03:00
Unified videos videos are now properly retrieved from the server
This commit is contained in:
@@ -15,10 +15,19 @@ export class RecentVideosComponent implements OnInit {
|
||||
constructor(private postsService: PostsService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.postsService.service_initialized.subscribe(init => {
|
||||
if (init) {
|
||||
this.getAllFiles();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getAllFiles() {
|
||||
|
||||
this.normal_files_received = false;
|
||||
this.postsService.getAllFiles().subscribe(res => {
|
||||
this.files = res['files'];
|
||||
this.files.sort(this.sortFiles);
|
||||
});
|
||||
}
|
||||
|
||||
sortFiles(a, b) {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
</mat-menu>
|
||||
<mat-card (click)="navigateToFile()" matRipple class="example-card mat-elevation-z6">
|
||||
<div style="padding:5px">
|
||||
<div *ngIf="fileThumbnail" class="img-div">
|
||||
<img class="image" [src]="file_thumbnail" alt="Thumbnail">
|
||||
<div *ngIf="file_obj.thumbnailURL" class="img-div">
|
||||
<img class="image" [src]="file_obj.thumbnailURL" alt="Thumbnail">
|
||||
</div>
|
||||
|
||||
<span class="max-two-lines"><strong>{{file_title}}</strong></span>
|
||||
|
||||
@@ -207,6 +207,10 @@ export class PostsService implements CanActivate {
|
||||
return this.http.post(this.path + 'getFile', {uid: uid, type: type, uuid: uuid}, this.httpOptions);
|
||||
}
|
||||
|
||||
getAllFiles() {
|
||||
return this.http.post(this.path + 'getAllFiles', {}, this.httpOptions);
|
||||
}
|
||||
|
||||
downloadFileFromServer(fileName, type, outputName = null, fullPathProvided = null, subscriptionName = null, subPlaylist = null,
|
||||
uid = null, uuid = null) {
|
||||
return this.http.post(this.path + 'downloadFile', {fileNames: fileName,
|
||||
|
||||
Reference in New Issue
Block a user