Formatting update

make-only-subtitle-default
HaveAGitGat 6 years ago
parent 6467644238
commit f6b9a1143a

@ -43,7 +43,7 @@ function plugin(file) {
console.log("File is not video") console.log("File is not video")
response.infoLog += " File is not video" response.infoLog += " File is not video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -62,17 +62,17 @@ function plugin(file) {
/// ///
if(file.meta.Title != undefined ){ if(file.meta.Title != undefined ){
response.infoLog += " File has title metadata" response.infoLog += " File has title metadata \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
}else{ }else{
response.infoLog += " File has no title metadata" response.infoLog += " File has no title metadata \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

@ -43,7 +43,7 @@ function plugin(file) {
console.log("File is not video") console.log("File is not video")
response.infoLog += " File is not video" response.infoLog += " File is not video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -71,7 +71,7 @@ function plugin(file) {
if(file.ffProbeData.streams[0].codec_name != 'h264'){ if(file.ffProbeData.streams[0].codec_name != 'h264'){
response.infoLog += " File is not in h264!" response.infoLog += " File is not in h264! \n"
response.preset = '-Z "Very Fast 1080p30"' response.preset = '-Z "Very Fast 1080p30"'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -79,7 +79,7 @@ function plugin(file) {
return response return response
}else{ }else{
response.infoLog += " File is already in h264!" response.infoLog += " File is already in h264! \n"
} }
@ -87,7 +87,7 @@ function plugin(file) {
if((file.meta.Title != "undefined") && !jsonString.includes("aac") && hasSubs){ if((file.meta.Title != "undefined") && !jsonString.includes("aac") && hasSubs){
response.infoLog += " File has title metadata and no aac and subs" response.infoLog += " File has title metadata and no aac and subs \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -97,7 +97,7 @@ function plugin(file) {
if(!jsonString.includes("aac") && hasSubs){ if(!jsonString.includes("aac") && hasSubs){
response.infoLog += "File has no aac track and has subs" response.infoLog += "File has no aac track and has subs \n"
response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2' response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -108,7 +108,7 @@ function plugin(file) {
if(file.meta.Title != "undefined" && hasSubs){ if(file.meta.Title != "undefined" && hasSubs){
response.infoLog += "File has title and has subs" response.infoLog += "File has title and has subs \n"
response.preset = '-sn,-map_metadata -1 -c:v copy -c:a copy' response.preset = '-sn,-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -121,7 +121,7 @@ function plugin(file) {
/// ///
if(file.meta.Title != undefined ){ if(file.meta.Title != undefined ){
response.infoLog += " File has title metadata" response.infoLog += " File has title metadata \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -133,7 +133,7 @@ function plugin(file) {
if(!jsonString.includes("aac")){ if(!jsonString.includes("aac")){
response.infoLog += " File has no aac track" response.infoLog += " File has no aac track \n"
response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2' response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -141,12 +141,12 @@ function plugin(file) {
return response return response
}else{ }else{
response.infoLog += " File has aac track" response.infoLog += " File has aac track \n"
} }
if(hasSubs){ if(hasSubs){
response.infoLog += " File has subs" response.infoLog += " File has subs \n"
response.preset = '-sn, -c:v copy -c:a copy' response.preset = '-sn, -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -154,11 +154,11 @@ function plugin(file) {
return response return response
}else{ }else{
response.infoLog += " File has no subs" response.infoLog += " File has no subs \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

@ -44,7 +44,7 @@ function plugin(file) {
console.log("File is not a 4K video") console.log("File is not a 4K video")
response.infoLog += " File is not a 4K video" response.infoLog += " File is not a 4K video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -107,7 +107,7 @@ function plugin(file) {
if (hasOnlyAC3TrackCommentaries && hasSubs) { if (hasOnlyAC3TrackCommentaries && hasSubs) {
response.infoLog += "File has only AC3 track Commentaries and has subs" response.infoLog += "File has only AC3 track Commentaries and has subs \n"
response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6' response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -115,7 +115,7 @@ function plugin(file) {
} }
if (hasNoAC3Track && hasSubs) { if (hasNoAC3Track && hasSubs) {
response.infoLog += "File has no AC3 track and has subs" response.infoLog += "File has no AC3 track and has subs \n"
response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6' response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -125,42 +125,42 @@ function plugin(file) {
if (!!hasOnlyAC3TrackCommentaries == true) { if (!!hasOnlyAC3TrackCommentaries == true) {
response.infoLog += " File has only AC3 track Commentaries!" response.infoLog += " File has only AC3 track Commentaries! \n"
response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6' response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
} else { } else {
response.infoLog += " File does not have only AC3 track Commentaries!" response.infoLog += " File does not have only AC3 track Commentaries! \n"
} }
if (hasNoAC3Track) { if (hasNoAC3Track) {
response.infoLog += " File has no AC3 track!" response.infoLog += " File has no AC3 track! \n"
response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6' response.preset = ',-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 ac3 -ac 6'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
} else { } else {
response.infoLog += " File has AC3 track!" response.infoLog += " File has AC3 track! \n"
} }
if (hasSubs) { if (hasSubs) {
response.infoLog += " File has subs!" response.infoLog += " File has subs! \n"
response.preset = '-sn, -c:v copy -c:a copy' response.preset = '-sn, -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
} else { } else {
response.infoLog += " File has no subs" response.infoLog += " File has no subs \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

@ -43,7 +43,7 @@ function plugin(file) {
console.log("File is not video") console.log("File is not video")
response.infoLog += " File is not video" response.infoLog += " File is not video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -76,7 +76,7 @@ function plugin(file) {
if((file.meta.Title != "undefined") && !jsonString.includes("aac") && hasSubs){ if((file.meta.Title != "undefined") && !jsonString.includes("aac") && hasSubs){
response.infoLog += " File has title metadata and no aac and subs" response.infoLog += " File has title metadata and no aac and subs \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -85,7 +85,7 @@ function plugin(file) {
if(!jsonString.includes("aac") && hasSubs){ if(!jsonString.includes("aac") && hasSubs){
response.infoLog += "File has no aac track and has subs" response.infoLog += "File has no aac track and has subs \n"
response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2' response.preset = '-sn,-map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -b:a:0 192k -ac 2'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -95,7 +95,7 @@ function plugin(file) {
if(file.meta.Title != "undefined" && hasSubs){ if(file.meta.Title != "undefined" && hasSubs){
response.infoLog += "File has title and has subs" response.infoLog += "File has title and has subs \n"
response.preset = '-sn,-map_metadata -1 -c:v copy -c:a copy' response.preset = '-sn,-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -107,13 +107,13 @@ function plugin(file) {
/// ///
if(file.meta.Title != undefined ){ if(file.meta.Title != undefined ){
response.infoLog += " File has title metadata" response.infoLog += " File has title metadata \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
}else{ }else{
response.infoLog += " File has no title metadata" response.infoLog += " File has no title metadata \n"
} }
if(!jsonString.includes("aac")){ if(!jsonString.includes("aac")){
@ -125,25 +125,25 @@ function plugin(file) {
return response return response
}else{ }else{
response.infoLog += " File has aac track" response.infoLog += " File has aac track \n"
} }
if(hasSubs){ if(hasSubs){
response.infoLog += " File has subs" response.infoLog += " File has subs \n"
response.preset = '-sn, -c:v copy -c:a copy' response.preset = '-sn, -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
}else{ }else{
response.infoLog += " File has no subs" response.infoLog += " File has no subs \n"
} }
if( file.container != 'mp4'){ if( file.container != 'mp4'){
response.infoLog += " File is not in mp4 container!" response.infoLog += " File is not in mp4 container! \n"
response.preset = ', -c:v copy -c:a copy' response.preset = ', -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
@ -152,13 +152,13 @@ function plugin(file) {
}else{ }else{
response.infoLog += " File is in mp4 container!" response.infoLog += " File is in mp4 container! \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

@ -41,7 +41,7 @@ function plugin(file) {
console.log("File is not video") console.log("File is not video")
response.infoLog += " File is not video" response.infoLog += " File is not video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -53,17 +53,17 @@ function plugin(file) {
if (file.meta.Title != undefined) { if (file.meta.Title != undefined) {
response.infoLog += " File has title metadata" response.infoLog += " File has title metadata \n"
response.preset = ',-map_metadata -1 -c:v copy -c:a copy' response.preset = ',-map_metadata -1 -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
} else { } else {
response.infoLog += " File has no title metadata" response.infoLog += " File has no title metadata \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

@ -39,7 +39,7 @@ function plugin(file) {
console.log("File is not video") console.log("File is not video")
response.infoLog += " File is not video" response.infoLog += " File is not video \n"
response.processFile = false; response.processFile = false;
return response return response
@ -65,18 +65,18 @@ function plugin(file) {
if(hasSubs){ if(hasSubs){
response.infoLog += " File has subs" response.infoLog += " File has subs \n"
response.preset = '-sn, -c:v copy -c:a copy' response.preset = '-sn, -c:v copy -c:a copy'
response.reQueueAfter = true; response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
return response return response
}else{ }else{
response.infoLog += " File has no subs" response.infoLog += " File has no subs \n"
} }
response.infoLog += " File meets conditions!" response.infoLog += " File meets conditions! \n"
return response return response
} }

Loading…
Cancel
Save