mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-13 16:20:59 +03:00
removed debug statements
This commit is contained in:
@@ -391,8 +391,6 @@ app.post('/tomp4', function(req, res) {
|
||||
var selectedHeight = req.body.selectedHeight;
|
||||
var customQualityConfiguration = req.body.customQualityConfiguration;
|
||||
|
||||
// console.log(selectedHeight);
|
||||
|
||||
let qualityPath = 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4';
|
||||
|
||||
if (customQualityConfiguration) {
|
||||
@@ -422,11 +420,7 @@ app.post('/tomp4', function(req, res) {
|
||||
}
|
||||
var modified_file_name = output_json ? output_json['title'] : null;
|
||||
if (!output_json) {
|
||||
// only get the first result
|
||||
// console.log(output_json);
|
||||
// console.log(output);
|
||||
continue;
|
||||
res.sendStatus(500);
|
||||
}
|
||||
var file_path = output_json['_filename'].split('\\');
|
||||
|
||||
@@ -654,7 +648,7 @@ app.get('/video/:id', function(req , res){
|
||||
file.on('close', function() {
|
||||
let index = descriptors[req.params.id].indexOf(file);
|
||||
descriptors[req.params.id].splice(index, 1);
|
||||
console.log('Successfully closed stream and removed file reference.');
|
||||
if (debugMode) console.log('Successfully closed stream and removed file reference.');
|
||||
});
|
||||
head = {
|
||||
'Content-Range': `bytes ${start}-${end}/${fileSize}`,
|
||||
@@ -694,7 +688,7 @@ app.get('/audio/:id', function(req , res){
|
||||
file.on('close', function() {
|
||||
let index = descriptors[req.params.id].indexOf(file);
|
||||
descriptors[req.params.id].splice(index, 1);
|
||||
console.log('Successfully closed stream and removed file reference.');
|
||||
if (debugMode) console.log('Successfully closed stream and removed file reference.');
|
||||
});
|
||||
head = {
|
||||
'Content-Range': `bytes ${start}-${end}/${fileSize}`,
|
||||
@@ -720,7 +714,6 @@ app.get('/audio/:id', function(req , res){
|
||||
let urlMode = !!req.body.urlMode;
|
||||
let type = req.body.type;
|
||||
let result = null;
|
||||
// console.log(urlMode);
|
||||
if (!urlMode) {
|
||||
if (type === 'audio') {
|
||||
result = getAudioInfos(fileNames)
|
||||
|
||||
@@ -227,8 +227,6 @@ export class MainComponent implements OnInit {
|
||||
}
|
||||
|
||||
public removeFromMp4(name: string) {
|
||||
// console.log(name);
|
||||
// console.log(this.mp4s);
|
||||
for (let i = 0; i < this.mp4s.length; i++) {
|
||||
if (this.mp4s[i].id === name) {
|
||||
this.mp4s.splice(i, 1);
|
||||
@@ -332,9 +330,7 @@ export class MainComponent implements OnInit {
|
||||
const cachedFormatsExists = this.cachedAvailableFormats[this.url];
|
||||
if (cachedFormatsExists) {
|
||||
const video_formats = this.cachedAvailableFormats[this.url]['video'];
|
||||
if (video_formats['best_audio_format'] && this.selectedQuality !== ''/* &&
|
||||
video_formats[this.selectedQuality]['acodec'] === 'none'*/) {
|
||||
console.log(this.selectedQuality);
|
||||
if (video_formats['best_audio_format'] && this.selectedQuality !== '') {
|
||||
customQualityConfiguration = video_formats[this.selectedQuality]['format_id'] + '+' + video_formats['best_audio_format'];
|
||||
}
|
||||
}
|
||||
@@ -446,15 +442,12 @@ export class MainComponent implements OnInit {
|
||||
}
|
||||
|
||||
getURLInfo(url) {
|
||||
console.log(this.cachedAvailableFormats[url]);
|
||||
if (!(this.cachedAvailableFormats[url])) {
|
||||
this.formats_loading = true;
|
||||
console.log('has no cached formats available');
|
||||
this.postsService.getFileInfo([url], 'irrelevant', true).subscribe(res => {
|
||||
if (url === this.url) { this.formats_loading = false; }
|
||||
const infos = res['result'];
|
||||
const parsed_infos = this.getAudioAndVideoFormats(infos.formats);
|
||||
console.log('got formats for ' + url);
|
||||
const available_formats = {audio: parsed_infos[0], video: parsed_infos[1]};
|
||||
this.cachedAvailableFormats[url] = available_formats;
|
||||
});
|
||||
@@ -471,7 +464,6 @@ export class MainComponent implements OnInit {
|
||||
.switch() // act on the return of the search
|
||||
.subscribe(
|
||||
(results: Result[]) => {
|
||||
// console.log(results);
|
||||
this.results_loading = false;
|
||||
if (results && results.length > 0) {
|
||||
this.results = results;
|
||||
@@ -510,7 +502,6 @@ export class MainComponent implements OnInit {
|
||||
const format_type = (format.vcodec === 'none') ? 'audio' : 'video';
|
||||
|
||||
format_obj.type = format_type;
|
||||
// console.log(format);
|
||||
if (format_obj.type === 'audio' && format.abr) {
|
||||
const key = format.abr.toString() + 'K';
|
||||
format_obj['bitrate'] = format.abr;
|
||||
|
||||
Reference in New Issue
Block a user