@@ -15,6 +15,16 @@ public static class AddTaskService
1515 public static TaskProfile LoadJsonAsProfile ( string filePath , DirectoryInfo jsonDir )
1616 {
1717 string profileStr = File . ReadAllText ( filePath ) ;
18+
19+ foreach ( string option in Constants . deprecatedOptions )
20+ {
21+ if ( profileStr . IndexOf ( option , StringComparison . OrdinalIgnoreCase ) >= 0 )
22+ {
23+ MessageBox . Show ( option + "已不再支持" , "json文件版本太老了" , MessageBoxButton . OK , MessageBoxImage . Error ) ;
24+ return null ;
25+ }
26+ }
27+
1828 TaskProfile json ;
1929 try
2030 {
@@ -125,17 +135,6 @@ public static TaskProfile ProcessJsonProfile(TaskProfile json, DirectoryInfo pro
125135 }
126136 }
127137
128- json . SubtitleLanguage = string . IsNullOrEmpty ( json . SubtitleLanguage ) ? Constants . language : json . SubtitleLanguage ;
129- if ( json . IncludeSub && json . SubtitleTracks == null )
130- {
131- MessageBox . Show ( "现在用SubtitleTracks指定字幕,指定了IncludeSub = true将视为有一条视频轨道" , "IncludeSub不再使用" , MessageBoxButton . OK , MessageBoxImage . Warning ) ;
132- Info info = new Info
133- {
134- Language = json . SubtitleLanguage
135- } ;
136- json . SubtitleTracks = new List < Info > { info } ;
137- }
138-
139138 if ( json . AudioTracks != null && json . AudioTracks . Count > 0 )
140139 {
141140 // 主音轨
@@ -160,11 +159,6 @@ public static TaskProfile ProcessJsonProfile(TaskProfile json, DirectoryInfo pro
160159 {
161160 track . Language = Constants . language ;
162161 }
163- if ( track . MuxOption == MuxOption . Default && track . SkipMuxing )
164- {
165- MessageBox . Show ( "现在用MuxOption指定封装法则,指定了SkipMuxing = true的音轨将不被抽取。" , "SkipMuxing不再使用" , MessageBoxButton . OK , MessageBoxImage . Warning ) ;
166- track . MuxOption = MuxOption . Skip ;
167- }
168162 }
169163 }
170164 else
0 commit comments