Commit Graph

7 Commits

Author SHA1 Message Date
U-GINA-PC\gina 8e56f1b305 Reduce dependency on OS in determining if file is video.
Introduce magic.IsVideoFileName, add test for it.

Fixes this error:

--- FAIL: TestIsVideo (0.08s)
    search_test.go:41: IsVideo failed video=true filename=movie.mkv mimetype=application/octet-stream
FAIL
FAIL	perkeep.org/pkg/types/camtypes	0.399s

Discussion about this problem is here:
https://groups.google.com/forum/#!topic/perkeep/Wdb_0Os6ZkY

Change-Id: I14f54bd60c9495d6aa665036b83c813673608ad7
2019-04-02 09:56:09 -07:00
Brad Fitzpatrick 7c03aef51f internal/magic: add mkv as a known video extension
Change-Id: Ifb868a26e7f1f6a9a5603b9ffb791282a19a34b1
2019-03-28 15:13:02 -07:00
Brad Fitzpatrick 4a27c0e90d internal/magic: recognize heic images
Updates #969

Change-Id: I3357dda3178cf07fd8122a3ec4ab2b5aec8495ad
2018-04-11 15:27:36 -07:00
Brad Fitzpatrick a3f7f2285c internal/magic: use field names in struct literals
In prep for next CL adding a field.

Change-Id: Ia53e20112e3592bd3ba6df353f6869ec2ecd208f
2018-04-09 21:42:39 -07:00
Paul Lindner 84b2c6b3e4 all: various lint fixes
- correct logging that logged functions instead of their value
- use ID vs Id naming
- use correct function names in comments

Change-Id: I61562cef7ebac7337ec6c85312cdf7915cb1a84b
2018-02-05 11:59:00 -08:00
Brad Fitzpatrick 57648c6b83 all: update copyright holder from Google Inc to The Perkeep Authors
The AUTHORS file is the list of copyright holders.
2018-01-03 16:52:49 -08:00
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00