Correction d'une petite erreur sur un test conditionnel... #130

Merged
Ghost merged 2 commits from BatchMergeSubtitleswithMKVMerge into master 2021-11-05 22:23:49 +01:00
Showing only changes of commit 28eb756ab0 - Show all commits

View File

@ -36,8 +36,10 @@ $sourceDirectory_2 = "PATH_TO_SOURCE_2"
$destinationDirectory = "PATH_TO_DESTINATION"
# Rename output file with this settings :
# $chain_to_search = ''
# $chain_to_search = '(\w+)\.S(\d{2})E(\d{2}).(.*)H264(.*)'
$chain_to_search = '(\w+)\.S(\d{2})E(\d{2})(.*)1080p.(.*)H.264(.*)'
# $chain__to_replace = ''
# $chain__to_replace = '$1 - S$2E$3 - $4x265-10bits$5--Reencoded'
$chain__to_replace = '$1 (2021) - S$2E$3 - 1080p.$5x265-10bits$6--Reencoded'
@ -57,7 +59,7 @@ $NB_External_SUB = 0
# Extension without the .
$MkvExtension = "mkv"
#Set Subtitle Extension (Don't add the . before the extension)
$SubExtension_1 = 'srt'
$SubExtension_1 = 'eng.srt'
$SubExtension_2 = 'fre.srt'
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
@ -68,9 +70,10 @@ $move_mkv1_after_merge = $true
# Move MKV2 (and SRT) to Not-Merged folder ? Set to $false or $true
$move_mkv1_after_merge = $true
# Initialization for those 2 variables, do not change them !
# Initialization for those 3 variables, do not change them !
$MKVMerge_sub_param = ""
$MKVMerge_audio_param = ""
$subtitle_tracks = ""
# ##################
#### FILE 1 - Keeping all but the video
@ -78,7 +81,7 @@ $MKVMerge_audio_param = ""
# Track 1 = Audio n°1
# Name and language of Audio Track n°1
$AudioTrackName_1 = "1:English - DDP 5.1"
$AudioLang_1 = "1:fr"
$AudioLang_1 = "1:eng"
$AudioTrack_1_default = "1:yes"
# Define track order. Do not modify it unless you changed the track number in this section
$track_order = "1:0,0:1"
@ -128,7 +131,7 @@ if ( $NB_External_SUB -ne 0 ) {
}
else {
# ================== INTERNAL SUBTITLES ==================
if ( $Internal_SUB -eq $false ) {
if ( $Internal_SUB -eq $true ) {
# Track 2 = Sub n°1 to keep
# Name and language of Subtitle Track n°1 + Sync Value
# $SubTrackName_1 = "2:English - SRT"
@ -367,7 +370,7 @@ Foreach ($MKV_1 in $MKV_1_List) {
}
else {
# INTERNAL SUB to keep
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --subtitle-tracks $subtitle_tracks --no-video"
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --subtitle-tracks $subtitle_tracks --no-video"
if ( $Internal_SUB -eq $true ) {
# There is some internal subtitles to keep
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param $MKVMerge_sub_param `"$MKV_1`""