diff --git a/scanner/metadata/metadata.go b/scanner/metadata/metadata.go index 88b5a0908..240e9353d 100644 --- a/scanner/metadata/metadata.go +++ b/scanner/metadata/metadata.go @@ -105,7 +105,7 @@ func (m *baseMetadata) parseInt(tagName string) int { return 0 } -var dateRegex = regexp.MustCompile(`^([12]\d\d\d)`) +var dateRegex = regexp.MustCompile(`([12]\d\d\d)`) func (m *baseMetadata) parseYear(tagName string) int { if v, ok := m.tags[tagName]; ok { diff --git a/scanner/metadata/metadata_test.go b/scanner/metadata/metadata_test.go index d68f59e8a..876abc3b6 100644 --- a/scanner/metadata/metadata_test.go +++ b/scanner/metadata/metadata_test.go @@ -15,7 +15,8 @@ var _ = Describe("ffmpegMetadata", func() { "1980.07.25": 1980, "2004-00-00": 2004, "2013-May-12": 2013, - "May 12, 2016": 0, + "May 12, 2016": 2016, + "01/10/1990": 1990, } for tag, expected := range examples { md := &baseMetadata{}