@ -9,7 +9,7 @@ function details() {
Type : "Video" ,
Description : ` (BUG) This plugin for 4K video removes subs. If no AC3 track exists, it adds one (max 5.1 channels). If only an AC3 commentary track exists, it adds a new AC3 main track (max 5.1 channels). The output container is the same as the original file. \n \n
` ,
Version : "1.0 2 ",
Version : "1.0 3 ",
Link : "https://github.com/HaveAGitGat/Tdarr_Plugin_hk75_Drawmonster_MP4_ac3_No_Subs_No_metaTitle"
}
@ -42,7 +42,7 @@ function plugin(file) {
console . log ( "File is not a 4K video" )
response . infoLog += " File is not a 4K video \n"
response . infoLog += " ☒ File is not a 4K video \n"
response . processFile = false ;
return response
@ -117,7 +117,7 @@ function plugin(file) {
if ( hasOnlyAC3TrackCommentaries && hasSubs ) {
response . infoLog += " File has only AC3 track Commentaries and has subs \n"
response . infoLog += " ☒File has no AC3 main track (has AC3 commentary) 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 ' + channels
response . reQueueAfter = true ;
response . processFile = true ;
@ -125,7 +125,7 @@ function plugin(file) {
}
if ( hasNoAC3Track && hasSubs ) {
response . infoLog += " File has no AC3 track and has subs \n"
response . infoLog += " ☒ File has no AC3 main 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 ' + channels
response . reQueueAfter = true ;
response . processFile = true ;
@ -135,42 +135,42 @@ function plugin(file) {
if ( ! ! hasOnlyAC3TrackCommentaries == true ) {
response . infoLog += " File has only AC3 track Commentaries ! \n"
response . infoLog += " ☒File has no AC3 main track (has AC3 commentary) ! \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 ' + channels
response . reQueueAfter = true ;
response . processFile = true ;
return response
} else {
response . infoLog += " File does not have only AC3 track C ommentaries! \n"
response . infoLog += " ☑File does not have only AC3 track c ommentaries! \n"
}
if ( hasNoAC3Track ) {
response . infoLog += " File has no AC3 track! \n"
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 ' + channels
response . reQueueAfter = true ;
response . processFile = true ;
return response
} else {
response . infoLog += " File has AC3 track! \n"
response . infoLog += " ☑ File has AC3 track! \n"
}
if ( hasSubs ) {
response . infoLog += " File has subs! \n"
response . infoLog += " ☒ File has subs! \n"
response . preset = ',-sn -c:v copy -c:a copy'
response . reQueueAfter = true ;
response . processFile = true ;
return response
} else {
response . infoLog += " File has no subs \n"
response . infoLog += " ☑ File has no subs \n"
}
response . infoLog += " File meets conditions! \n"
response . infoLog += " ☑ File meets conditions! \n"
return response
}