|
@@ -1,6 +1,7 @@
|
|
|
package downloader
|
|
package downloader
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
|
+ "github.com/allanpk716/ChineseSubFinder/internal/pkg/change_file_encode"
|
|
|
"github.com/allanpk716/ChineseSubFinder/internal/pkg/decode"
|
|
"github.com/allanpk716/ChineseSubFinder/internal/pkg/decode"
|
|
|
"github.com/allanpk716/ChineseSubFinder/internal/pkg/my_util"
|
|
"github.com/allanpk716/ChineseSubFinder/internal/pkg/my_util"
|
|
|
subcommon "github.com/allanpk716/ChineseSubFinder/internal/pkg/sub_formatter/common"
|
|
subcommon "github.com/allanpk716/ChineseSubFinder/internal/pkg/sub_formatter/common"
|
|
@@ -200,6 +201,15 @@ func (d *Downloader) writeSubFile2VideoPath(videoFileFullPath string, finalSubFi
|
|
|
return err
|
|
return err
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 判断是否需要转换字幕的编码
|
|
|
|
|
+ if d.settings.ExperimentalFunction.AutoChangeSubEncode.Enable == true {
|
|
|
|
|
+ d.log.Infoln("----------------------------------")
|
|
|
|
|
+ d.log.Infoln("change_file_encode to", d.settings.ExperimentalFunction.AutoChangeSubEncode.GetDesEncodeType())
|
|
|
|
|
+ err = change_file_encode.Process(desSubFullPath, d.settings.ExperimentalFunction.AutoChangeSubEncode.DesEncodeType)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|