fix: cover art detection regex
This commit is contained in:
@@ -157,7 +157,7 @@ var (
|
|||||||
regexp.MustCompile(`(?i)^\s{4,6}disctotal\s+:\s(.*)`): "discTotal",
|
regexp.MustCompile(`(?i)^\s{4,6}disctotal\s+:\s(.*)`): "discTotal",
|
||||||
regexp.MustCompile(`(?i)^\s{4,6}TPA\s+:\s(.*)`): "discNum",
|
regexp.MustCompile(`(?i)^\s{4,6}TPA\s+:\s(.*)`): "discNum",
|
||||||
regexp.MustCompile(`(?i)^\s{4,6}date\s+:\s(.*)`): "year",
|
regexp.MustCompile(`(?i)^\s{4,6}date\s+:\s(.*)`): "year",
|
||||||
regexp.MustCompile(`^\s{4}Stream #\d+:\d+: (Video):.*pic\)$`): "hasPicture",
|
regexp.MustCompile(`^\s{4}Stream #\d+:\d+: (Video):.*`): "hasPicture",
|
||||||
}
|
}
|
||||||
|
|
||||||
durationRx = regexp.MustCompile(`^\s\sDuration: ([\d.:]+).*bitrate: (\d+)`)
|
durationRx = regexp.MustCompile(`^\s\sDuration: ([\d.:]+).*bitrate: (\d+)`)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Input #0, mp3, from '/Users/deluan/Music/iTunes/iTunes Media/Music/Compilations/
|
|||||||
compilation : 1
|
compilation : 1
|
||||||
Duration: 00:00:01.02, start: 0.000000, bitrate: 477 kb/s
|
Duration: 00:00:01.02, start: 0.000000, bitrate: 477 kb/s
|
||||||
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
|
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
|
||||||
Stream #0:1: Video: mjpeg (Baseline), gray(bt470bg/unknown/unknown), 600x600 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)`
|
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc`
|
||||||
md, _ := extractMetadata("tests/fixtures/test.mp3", output)
|
md, _ := extractMetadata("tests/fixtures/test.mp3", output)
|
||||||
Expect(md.HasPicture()).To(BeTrue())
|
Expect(md.HasPicture()).To(BeTrue())
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user