Commit Graph

139 Commits

Author SHA1 Message Date
David Howden
f163d543fb id3v2: remove unused method and merge declaration 2018-04-02 08:18:11 +10:00
David Howden
964345f10f fix const declarations 2018-04-02 08:17:25 +10:00
David Howden
3fc65dddfc id3v2: fix variable name and pre-compute genre regexp 2018-04-02 08:17:10 +10:00
David Howden
4f91c64763 id3v2: tidy up dataSplit and decodeText 2018-04-02 08:16:46 +10:00
David Howden
610452ee64 tools: move to cmd subdir 2018-04-02 08:14:54 +10:00
Markus Krogh
f4ddc56a4c id3v2 : fix triple null termination utf-16 little endian. (#36)
* Fix triple null termination utf-16 little endian.

When fixing result[1] result[0] should be fixed as well.

* result[0] should be fixed before fixing result[1]
2018-04-02 07:26:56 +10:00
David Howden
ba105bfefc id3v2: fix panic on invalid encoding of UTF-16 text 2018-02-19 18:01:22 +11:00
David Howden
d2206af145 mp4: fix panic on invalid encoding 2018-02-17 13:07:03 +11:00
David Howden
d449289c5e vorbis: fix panic on invalid encoding
Fixes #33
2018-02-07 18:37:07 +11:00
David Howden
1582ebc2a4 mp4: fix panic on invalid encoding
Fixes #32
2018-02-07 18:36:47 +11:00
David Howden
737d3560dd mp4: fix panic on invalid encoding
Fixes #31
2018-02-07 18:36:17 +11:00
David Howden
3066d30077 Merge branch 'thraxil-master' 2017-10-22 22:23:05 +11:00
Anders Pearson
22a6715536
fix bug with invalid APIC mimetype
Return an error if the mimetype can't be decoded rather than
panicking. See #28.
2017-10-22 11:42:29 +01:00
David Howden
e24fc33f60 Fix Format and FileType enumerations, and incorrect Format() for OGG. 2017-09-14 08:55:56 +10:00
David Howden
5e368ba94d Fix parsing of year in ID3v2.4
Fixes #27
2017-09-14 08:43:05 +10:00
David Howden
b45cd4d440 Update README.md
Use console lang for console output.
2017-08-01 22:29:01 +10:00
David Howden
9edd38ca5d Update README to set language on code snippets. 2017-01-29 10:14:22 +11:00
David Howden
0b712361d3 Merge branch 'upperstream-id3v1-track-and-comment' 2016-07-17 09:10:21 +10:00
upperstream
29306b7487 Move ID3v1 test data under internal directory
* A relative path import is not used
* Applications cannot access test data any longer
2016-07-17 08:16:53 +10:00
upperstream
f16224df21 Add generated source file containing test data. 2016-07-17 08:16:53 +10:00
upperstream
abfb4860c4 Fix: metadataID3v1 did not set the value for "comment" key unless the tag is ID3v1.1. 2016-07-17 08:16:53 +10:00
upperstream
ae005145bc Fix: Track() for ID3v1.1 picked a wrong byte for the track number delimeter in
the comment field.
This results in neither the track number nor the comment being set properly.
2016-07-17 08:16:53 +10:00
upperstream
c119c3eeeb Add tests for ID3v1 and ID3v1.1. 2016-07-17 08:16:53 +10:00
David Howden
028d342425 Merge branch 'fallback-decode-iso-8859-1' 2016-07-11 12:51:03 -06:00
David Howden
9daeb83105 Update delimiter to fallback to ISO-8859-1. 2016-05-09 22:40:03 +10:00
David Howden
bfba4b35ab Updated text decoding to fallback to ISO-8859-1.
See #20 for more details.
2016-05-09 22:37:19 +10:00
David Howden
1c1d74b935 Merge pull request #24 from wader/skip-extended-header
Read and skip extended header bytes for 2.3 and 2.4
2016-05-06 06:50:24 +10:00
Mattias Wadman
2d92c90588 Read and skip extended header bytes for 2.3 and 2.4
Fixes #21
2016-05-05 17:18:51 +02:00
David Howden
66b965ab49 Merge pull request #23 from dhowden/vorbis-albumartist
Set Vorbis.AlbumArtist to return "albumartist" attribute.
2016-04-21 07:00:30 +10:00
David Howden
4cd9615aa1 Set Vorbis.AlbumArtist to return "albumartist" attribute. 2016-04-20 21:52:54 +10:00
David Howden
bccc91e40d Fix: Detect PNG artwork when class = 0 (implicit) is set.
TODO: We should also try to detect JPEG artwork, but JPEG headers are a bit more tricky.

Fixes #19.
2016-03-06 22:24:05 +11:00
David Howden
a55be0e8bf check: Don't break on URL parsing error. 2016-03-06 22:21:54 +11:00
David Howden
996bee7eb6 Fix panic when picture isn't properly parsed.
See issue #19.
2016-03-05 16:17:11 +11:00
David Howden
a35ac09042 Distinguish between M4{A,B,P} formats.
Note: Removes tag.AAC.
2016-02-22 21:01:12 +11:00
David Howden
5b94194b29 Remove unused error parameter, and tidy up implementation. 2016-01-03 23:05:17 +11:00
David Howden
030e21e7c2 Added DefaultUTF16WithBOMByteOrder for instances where no BOM is given. 2016-01-03 23:00:45 +11:00
David Howden
5fe43c28e4 Merge pull request #17 from wader/com-ult-frames
Add COM and ULT text frames
2016-01-03 08:39:49 +11:00
Mattias Wadman
78bcb9ae28 Add COM and ULT text frames
Add COM and ULT, both have lang and enc
See http://id3.org/id3v2-00
2016-01-01 16:20:32 +01:00
David Howden
dc1f3d7b51 Merge pull request #16 from wader/all-ftyp
Parse all ftyp:s as mp4
2015-12-29 13:25:45 +11:00
Mattias Wadman
f26c1533ee Parse all ftyp:s as mp4
It seems audio only mp4 files use ftyp:s that should have video
2015-12-28 21:36:06 +01:00
David Howden
c259675f29 Use switch in place of multiple if statements. 2015-09-20 20:13:12 +10:00
David Howden
554fadb2b4 Added Sum support for FLAC 2015-09-20 20:09:42 +10:00
David Howden
549eab9b75 Merge pull request #14 from xhenner/itunes
Be a little less strict on invalid frames
2015-07-12 11:27:14 +10:00
Xavier Henner
05c9a3fa59 Be a little less strict on invalid frames
Add iTunes frames and ignore unknown frame only if they are too big
2015-07-12 02:02:12 +02:00
David Howden
334c71001c Merge pull request #13 from xhenner/genre
Support for numeric genres in id3v2
2015-07-04 22:49:17 +10:00
Xavier Henner
1e646522d6 Support for numeric genres in id3v2
TCON

    The 'Content type', which previously was stored as a one byte numeric value
only, is now a numeric string. You may use one or several of the types as
ID3v1.1 did or, since the category list would be impossible to maintain with
accurate and up to date categories, define your own.

    References to the ID3v1 genres can be made by, as first byte, enter "("
followed by a number from the genres list (appendix A) and ended with a ")"
character. This is optionally followed by a refinement, e.g. "(21)" or
"(4)Eurodisco". Several references can be made in the same frame, e.g.
"(51)(39)". If the refinement should begin with a "(" character it should be
replaced with "((", e.g. "((I can figure out any genre)" or "(55)((I
think...)". The following new content types is defined in ID3v2 and is
implemented in the same way as the numerig content types, e.g. "(RX)".

To test it, use the id3v2 tool

% id3v2 -g 79 test.mp3
% id3v2 -l test.mp3| grep TCON
TCON (Content type): Hard Rock (79)
% ./tag test.mp3| grep Genre
 Genre: (79)

With the patch :
% go build && ./tag test.mp3| grep Genre
 Genre: Hard Rock
2015-07-04 14:20:43 +02:00
David Howden
62e2154cad Fix godoc comment. 2015-07-03 23:15:16 +10:00
David Howden
78f72c23bd Added Identity to check tool. 2015-07-02 23:07:50 +10:00
David Howden
b60e529091 Add Identity function for identifying metadata/filetypes. 2015-07-02 23:07:17 +10:00
David Howden
92e6d71ddb Refactor common code to skip last 128 bytes from ReadSeeker. 2015-06-30 23:07:26 +10:00