mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-19 22:33:21 +03:00
Added support for navigating to files in recent videos (subscription and not). No support for download-only mode yet
Added navigate to subscription menu item for the files Sidenav mode is "side" now for testing, likely not a permanent change and will be optional in the future
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { VideoInfoDialogComponent } from 'app/dialogs/video-info-dialog/video-info-dialog.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-unified-file-card',
|
||||
@@ -14,28 +16,46 @@ export class UnifiedFileCardComponent implements OnInit {
|
||||
type = null;
|
||||
use_youtubedl_archive = false;
|
||||
|
||||
isSubscriptionFile: boolean = null;
|
||||
|
||||
@Input() file_obj = null;
|
||||
@Output() goToFile = new EventEmitter<any>();
|
||||
@Output() goToSubscription = new EventEmitter<any>();
|
||||
|
||||
constructor() { }
|
||||
/*
|
||||
Planned sizes:
|
||||
small: 150x175
|
||||
medium: 200x200
|
||||
big: 250x200
|
||||
*/
|
||||
|
||||
constructor(private dialog: MatDialog) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.file_length = fancyTimeFormat(this.file_obj.duration);
|
||||
}
|
||||
|
||||
deleteFile(blacklistMode = false) {
|
||||
if (this.file_obj.sub_id) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
navigateToFile() {
|
||||
this.goToFile.emit(this.file_obj);
|
||||
}
|
||||
|
||||
navigateToSubscription() {
|
||||
this.goToSubscription.emit(this.file_obj);
|
||||
}
|
||||
|
||||
openFileInfoDialog() {
|
||||
|
||||
this.dialog.open(VideoInfoDialogComponent, {
|
||||
data: {
|
||||
file: this.file_obj,
|
||||
},
|
||||
minWidth: '50vw'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function fancyTimeFormat(time) {
|
||||
|
||||
Reference in New Issue
Block a user