Merge pull request #34 from JackDallas/fix-therealshadoh-subs

Fix subs re-queue bug in therealshadoh plugins
This commit is contained in:
HaveAGitGat 2020-01-29 16:46:27 +00:00 committed by GitHub
commit 246038129f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,11 +53,9 @@ function plugin(file) {
for (var i = 0; i < file.ffProbeData.streams.length; i++) { for (var i = 0; i < file.ffProbeData.streams.length; i++) {
try { try {
let streamData = file.ffProbeData.streams[i];
if(file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle"){ if(streamData.codec_type.toLowerCase() == "subtitle" && streamData.codec_name != "mov_text"){
hasSubs = true hasSubs = true
} }
} catch (err) { } } catch (err) { }
} }
@ -122,7 +120,7 @@ function plugin(file) {
response.FFmpegMode = true response.FFmpegMode = 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")){
@ -140,15 +138,14 @@ function plugin(file) {
if(hasSubs){ if(hasSubs){
response.infoLog += "☒File has subs \n" response.infoLog += "☒File has incompatible subs \n"
response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text'
response.reQueueAfter = true;
response.processFile = true; response.processFile = true;
response.FFmpegMode = true response.FFmpegMode = true
return response return response
}else{ }else{
response.infoLog += "☑File has no subs \n" response.infoLog += "☑File has no/compatible subs \n"
} }
response.infoLog += "☑File meets conditions! \n" response.infoLog += "☑File meets conditions! \n"