61
61
(folder , thumb , tag , team , announce , tmdb_api_key , tag_thumb ) = option ()
62
62
63
63
64
- def MUXING_MODE (encode_type , source , title , year , stag ):
64
+ def MUXING_MODE (encode_type , source , title , year , stag , folder ):
65
65
66
66
# Set some values
67
67
extend = ".mkv"
@@ -74,8 +74,8 @@ def MUXING_MODE(encode_type, source, title, year, stag):
74
74
75
75
# Audio infos
76
76
audiotype = ask_audio_type ()
77
- (audio_config , audiocodec , lang ,
78
- audiolang ) = AUDIO_CONFIGURATION (audiotype , encode_type )
77
+ (audio_config , audiocodec , lang , audiolang , audionum ,
78
+ audionum2 ) = AUDIO_CONFIGURATION (audiotype , encode_type )
79
79
xcod_val = ["x264" , "x265" ]
80
80
xcod2_val = ["AC3" , "DTS" , "AAC" ]
81
81
for item in xcod_val :
@@ -112,16 +112,30 @@ def MUXING_MODE(encode_type, source, title, year, stag):
112
112
nfoimdb = ask_rls_imdb ()
113
113
(name , nfoimdb ) = find_release_title (nfoimdb )
114
114
115
+ # Mkvextract Tracks
116
+ idvid = "{0}:{0}" .format (idvideo )
117
+ [audio_1 , audio_2 ] = ["" , ] * 2
118
+ if audionum :
119
+ audio_1 = " {0}:{0}" .format (audionum )
120
+ if audionum2 :
121
+ audio_2 = " {0}:{0}" .format (audionum2 )
122
+ mkvextract = "cd {0} && mkdir tmp_mkv && cd tmp_mkv && mkvextract tracks" \
123
+ " {1} {2}{3}{4} && mkvmerge -o {5}.{6}{7}{8} {10} {11} {12}" \
124
+ " && mv {5}.{6}{7}{8} {9} && cd .. && rm -r tmp_mkv" \
125
+ .format (thumb , source , idvid , audio_1 , audio_2 , title , year ,
126
+ stag , mark , folder , idvideo , audionum , audionum2 )
127
+ source_mkv = "{0}{1}.{2}{3}{4}" .format (folder , title , year , stag , mark )
128
+
115
129
# Final remux cmds
116
130
mkvmerge = MKVMERGE (subtype , audiotype , thumb , title , year , stag , mark ,
117
131
extend , sync , titlesub , charset , idsub , forced , sync2 ,
118
132
titlesub2 , charset2 , idsub2 , subsource )
119
133
temp = "{0}{1}{2}" .format (thumb , title , extend )
120
- mkvmerge = mkvmerge .split ('&&' , 2 )[1 ].strip ().replace (temp , source )
134
+ mkvmerge = mkvmerge .split ('&&' , 2 )[1 ].strip ().replace (temp , source_mkv )
121
135
tools = ankoa_tools (thumb , title , year , stag , mark , audiolang , prezquality ,
122
136
titlesub , subforced , nfosource , nfoimdb , name )
123
137
124
- return (mkvmerge , tools )
138
+ return (mkvmerge , mkvextract , tools )
125
139
126
140
127
141
def AUDIO_CONFIGURATION (audiotype , encode_type ):
@@ -218,7 +232,7 @@ def AUDIO_CONFIGURATION(audiotype, encode_type):
218
232
elif (audiotype == "1" or audiotype == "2" or audiotype == "3" ):
219
233
audio_config = audio_solo_config (audionum , audiolang , config )
220
234
221
- return (audio_config , audiocodec , lang , audiolang )
235
+ return (audio_config , audiocodec , lang , audiolang , audionum , audionum2 )
222
236
223
237
224
238
def RELEASE_FINAL_TITLE (audiocodec , lang , form , xcod , tag , extend ):
0 commit comments