summaryrefslogtreecommitdiff
path: root/mkvlib/mkv.go
diff options
context:
space:
mode:
Diffstat (limited to 'mkvlib/mkv.go')
-rw-r--r--mkvlib/mkv.go40
1 files changed, 20 insertions, 20 deletions
diff --git a/mkvlib/mkv.go b/mkvlib/mkv.go
index 80c5bf1..fc694e2 100644
--- a/mkvlib/mkv.go
+++ b/mkvlib/mkv.go
@@ -67,7 +67,7 @@ func (self *mkvProcessor) DumpMKV(file, output string, subset bool, lcb logCallb
ec := 0
obj := self.GetMKVInfo(file)
if obj == nil {
- PrintLog(lcb, LogError, `Failed to get the file info: "%s".`, file)
+ printLog(lcb, logError, `Failed to get the file info: "%s".`, file)
return false
}
attachments := make([]string, 0)
@@ -124,7 +124,7 @@ func (self *mkvProcessor) DumpMKV(file, output string, subset bool, lcb logCallb
ec++
}
} else {
- PrintLog(lcb, LogInfo, `This file is not has the subtitles & attachments: "%s"`, file)
+ printLog(lcb, logInfo, `This file is not has the subtitles & attachments: "%s"`, file)
}
return ec == 0
}
@@ -132,7 +132,7 @@ func (self *mkvProcessor) DumpMKV(file, output string, subset bool, lcb logCallb
func (self *mkvProcessor) CheckSubset(file string, lcb logCallback) (bool, bool) {
obj := self.GetMKVInfo(file)
if obj == nil {
- PrintLog(lcb, LogError, `Failed to get the file info: "%s".`, file)
+ printLog(lcb, logError, `Failed to get the file info: "%s".`, file)
return false, true
}
ass := false
@@ -210,10 +210,10 @@ func (self *mkvProcessor) DumpMKVs(dir, output string, subset bool, lcb logCallb
p = path.Join(output, d, f)
if !self.DumpMKV(item, p, subset, lcb) {
ok = false
- PrintLog(lcb, LogError, `Failed to dump the file: "%s".`, item)
+ printLog(lcb, logError, `Failed to dump the file: "%s".`, item)
} else {
_ok++
- PrintLog(lcb, LogProgress, "Dump (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "Dump (%d/%d) done.", _ok, l)
}
}
return ok
@@ -226,11 +226,11 @@ func (self *mkvProcessor) QueryFolder(dir string, lcb logCallback) []string {
for i, file := range files {
a, b := self.CheckSubset(file, lcb)
if b {
- PrintLog(lcb, LogError, `Failed to check subset for file: "%s".`, file)
+ printLog(lcb, logError, `Failed to check subset for file: "%s".`, file)
} else if !a {
lines = append(lines, file)
}
- PrintLog(lcb, LogProgress, "Query (%d/%d) done.", i+1, l)
+ printLog(lcb, logProgress, "Query (%d/%d) done.", i+1, l)
}
return lines
}
@@ -258,9 +258,9 @@ func (self *mkvProcessor) CreateMKVs(vDir, sDir, fDir, tDir, oDir, slang, stitle
fn += ".mkv"
}
if _a, _ := isExists(fn); _a && self.noverwrite {
- PrintLog(lcb, LogInfo, `Existing file: "%s",skip.`, fn)
+ printLog(lcb, logInfo, `Existing file: "%s",skip.`, fn)
_ok++
- PrintLog(lcb, LogProgress, "Create (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "Create (%d/%d) done.", _ok, l)
continue
}
for _, sub := range tmp {
@@ -292,10 +292,10 @@ func (self *mkvProcessor) CreateMKVs(vDir, sDir, fDir, tDir, oDir, slang, stitle
}
if ec > 0 {
ok = false
- PrintLog(lcb, LogError, `Failed to create the file: "%s".`, item)
+ printLog(lcb, logError, `Failed to create the file: "%s".`, item)
} else {
_ok++
- PrintLog(lcb, LogProgress, "Create (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "Create (%d/%d) done.", _ok, l)
}
}
_ = os.RemoveAll(tDir)
@@ -317,9 +317,9 @@ func (self *mkvProcessor) MakeMKVs(dir, data, output, slang, stitle string, lcb
fn += ".mkv"
}
if _a, _ := isExists(fn); _a && self.noverwrite {
- PrintLog(lcb, LogInfo, `Existing file: "%s",skip.`, fn)
+ printLog(lcb, logInfo, `Existing file: "%s",skip.`, fn)
_ok++
- PrintLog(lcb, LogProgress, "Make (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "Make (%d/%d) done.", _ok, l)
continue
}
p = path.Join(data, d, f)
@@ -330,10 +330,10 @@ func (self *mkvProcessor) MakeMKVs(dir, data, output, slang, stitle string, lcb
tracks := append(subs, asses...)
if !self.CreateMKV(item, tracks, attachments, fn, slang, stitle, true) {
ok = false
- PrintLog(lcb, LogError, `Failed to make the file: "%s".`, item)
+ printLog(lcb, logError, `Failed to make the file: "%s".`, item)
} else {
_ok++
- PrintLog(lcb, LogProgress, "Make (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "Make (%d/%d) done.", _ok, l)
}
}
return ok
@@ -515,11 +515,11 @@ func (self *mkvProcessor) CreateTestVideo(asses []string, s, fontdir, enc string
ok := self.CreateBlankOrBurnVideo(0, s, enc, v, fontdir, _output)
if !ok {
ec++
- PrintLog(lcb, LogError, `Failed to create the test video file: "%s"`, _output)
+ printLog(lcb, logError, `Failed to create the test video file: "%s"`, _output)
_ = os.Remove(_output)
} else {
_ok++
- PrintLog(lcb, LogProgress, "CT (%d/%d) done.", _ok, l)
+ printLog(lcb, logProgress, "CT (%d/%d) done.", _ok, l)
}
}
return ec == 0
@@ -542,16 +542,16 @@ func (self *mkvProcessor) CreateTestVideo(asses []string, s, fontdir, enc string
s = path.Join(d, fmt.Sprintf("%s.mp4", n))
if !self.CreateBlankOrBurnVideo(t.Milliseconds(), "", enc, "", "", s) {
ok = false
- PrintLog(lcb, LogError, `Failed to create the temp video file: "%s".`, s)
+ printLog(lcb, logError, `Failed to create the temp video file: "%s".`, s)
}
}
if ok {
output := path.Join(d, fmt.Sprintf("%s.mkv", n))
if !self.CreateMKV(s, asses, _fonts, output, "", "", true) {
ok = false
- PrintLog(lcb, LogError, `Failed to create the test video file: "%s".`, output)
+ printLog(lcb, logError, `Failed to create the test video file: "%s".`, output)
} else {
- PrintLog(lcb, LogProgress, "CT done.")
+ printLog(lcb, logProgress, "CT done.")
}
}
if _t {