Added ability to crop files

Fixed bug in downloading playlists
This commit is contained in:
Isaac Abadi
2021-02-12 21:20:48 -07:00
parent e34aa4d9d6
commit 433d08e9df
6 changed files with 84 additions and 11 deletions

View File

@@ -54,6 +54,9 @@ export class MainComponent implements OnInit {
youtubeAuthEnabled = false;
youtubeUsername = null;
youtubePassword = null;
cropFile = false;
cropFileStart = null;
cropFileEnd = null;
urlError = false;
path = '';
url = '';
@@ -521,8 +524,17 @@ export class MainComponent implements OnInit {
const customQualityConfiguration = this.getSelectedVideoFormat();
let cropFileSettings = null;
if (this.cropFile) {
cropFileSettings = {
cropFileStart: this.cropFileStart,
cropFileEnd: this.cropFileEnd
}
}
this.postsService.makeMP4(this.url, (this.selectedQuality === '' ? null : this.selectedQuality),
customQualityConfiguration, customArgs, customOutput, youtubeUsername, youtubePassword, new_download.uid).subscribe(posts => {
customQualityConfiguration, customArgs, customOutput, youtubeUsername, youtubePassword, new_download.uid, cropFileSettings).subscribe(posts => {
// update download object
new_download.downloading = false;
new_download.percent_complete = 100;