Commit Graph

76 Commits

Author SHA1 Message Date
David Howden
db723fecfc Check each ID3 tag is valid.
Some tag encoders like to use non-standard padding (see http://id3.org/Compliance%20Issues) which was causing "unexpected EOF" errors.  Checking that each tag has a valid name (as per the spec) seems to be the only good way around this.
2015-06-28 09:53:07 +10:00
David Howden
1b0e92375a Fix: panic on empty description in text-description frames. 2015-06-27 19:24:33 +10:00
David Howden
d3e0c4a33f Simplify MusicBrainz Info type and support more tags. 2015-06-08 11:01:32 +10:00
David Howden
c06066fd88 Updated package godoc comment. 2015-06-07 13:01:12 +10:00
David Howden
6df4e78d96 Remove non-relative Seek calls from all functions.
Previously we would seek to the beginning of the io.ReadSeeker. It is much more
flexible to assume that the caller passes the ReadSeeker in an appropriate state.
2015-06-07 12:58:58 +10:00
David Howden
7f8f21cc46 Added flag.Usage output to check tool. 2015-06-07 12:54:44 +10:00
David Howden
4d2e737694 Remove old TODO comment. 2015-06-06 16:35:44 +10:00
David Howden
ddaa43f29c Added some more godoc comments. 2015-06-06 16:35:44 +10:00
David Howden
6cd7fd8f70 Added -mbz option to tag tool to output MusicBrainz information. 2015-06-06 16:35:44 +10:00
David Howden
e7f103ff85 Improved default usage output to use flag.PrintDefaults(). 2015-06-06 16:35:44 +10:00
David Howden
9534e41d81 Added mbz subpackage for extracting MusicBrainz-specific tags.
This is a rewrite of pull request #11 which was a first attempt at this (thanks @xhenner for starting this).
2015-06-06 16:35:39 +10:00
David Howden
d03fdf9fb5 Remove debugging output 2015-05-27 18:58:35 +10:00
David Howden
36d9163868 Refactored all MP4 code to better handle custom atoms 2015-05-27 08:43:47 +10:00
David Howden
e6dce4ae2a Merge branch 'xhenner-allmp4' 2015-05-25 22:50:42 +10:00
David Howden
3f92286cdb Merge branch 'allmp4' of https://github.com/xhenner/tag into xhenner-allmp4 2015-05-25 22:36:14 +10:00
Xavier Henner
6c5d32240b typo in comment + small correction 2015-05-25 08:57:37 +02:00
Xavier Henner
a931bf6e30 Code refactorization
Should even work if the subatoms of "----" are out of order
2015-05-25 08:45:31 +02:00
Xavier Henner
be3da62488 Add more tags to mp4
1) correct a bug with the mdat atom.
Sometimes, the metadata can be at the end, after the audio
Demo :
   get any music file and strip the metadata
   convert it to m4a with ffmpeg
   analyse it with MusicBrainz Picard
   et voila, you have the metadata at the end.

Example of structure of a m4a created that way;
https://www.dropbox.com/s/602yivdstan7506/atom.txt?dl=0

2) add support for the "----" tag
See http://atomicparsley.sourceforge.net/mpeg-4files.html
It gives access to the tags created by MusicBrainz Picard
2015-05-25 00:33:47 +02:00
David Howden
ffefb50681 Merge pull request #9 from xhenner/allid3v2
Fix a bug in Sum() and add all id3frames in Raw()
2015-05-25 07:36:38 +10:00
Xavier Henner
a678a5d67b Fix a bug in Sum() and add all id3frames in Raw()
The Seek in SumID3v2() didn't take into account the size of the ID3v2 Header
(10 bytes). Thus when tagging the same file with or without it's tag, there was
a discrepancy. (

And I've added a default case when parsing the id3v2 tags, by storing the
binary content to Raw()
2015-05-24 21:19:15 +02:00
David Howden
5ed21afced Added Lyrics() to README 2015-05-24 22:49:06 +10:00
David Howden
8bdc82eff0 Added Genre() to Metadata interface 2015-05-24 22:37:21 +10:00
David Howden
ce0c1dc2f8 Remove append no-op! 2015-05-24 13:13:43 +10:00
David Howden
2cbec0cf93 Fix panic when len(result[1]) == 0 2015-05-24 13:13:32 +10:00
David Howden
47d9285956 Small refactor to dataSplit 2015-05-24 13:13:06 +10:00
David Howden
5da0ca1f03 Removed unnecessary space 2015-05-24 12:23:31 +10:00
David Howden
7d23e28e65 Refactor readTextWithDescr function 2015-05-24 12:23:30 +10:00
David Howden
b55f474bf9 Refactor readTFrame and added readWFrame 2015-05-24 12:23:30 +10:00
David Howden
f782cbdf44 Add check for size of provider/identifier split 2015-05-24 12:23:30 +10:00
David Howden
1832dec4e7 Refactor Ufid -> UFID 2015-05-24 12:23:30 +10:00
Xavier Henner
eef1ffcbbd Support for the UFID tag 2015-05-24 12:23:30 +10:00
Xavier Henner
45d987ac1d Support for TXXX, WXXX and generic W frames
I hacked readTextWithDescrFrame() and readTFrame() to generalize them
to other case (presence or not of a language and whether or not the
data part is encoded (URL are not)

This patch depend of 3b7a3d5485 since I found the
bug while developping this patch
2015-05-24 12:23:30 +10:00
Xavier Henner
f6a1e5325c Fix bug in the split method
Sometimes, we can have this configuration :

description 00 00 00 data (with delim = [00 00])
with splitN, we make the separation at the first 00 00 :
[description, 00 data]

But in fact, we must make the separation one byte later
[description 00, data]
2015-05-24 12:23:30 +10:00
David Howden
255636cc34 Update README to add OGG 2015-05-24 11:29:38 +10:00
David Howden
4c2b34fa94 Reorganised Vorbis Comment parsing into own type
- Added FileType to Metadata to distinguish between FLAC and OGG
- TODO: fix ALAC files being identified as AAC
2015-05-24 10:44:45 +10:00
David Howden
77d9aa6414 Added tool for checking tags over iTunes Library or path 2015-05-24 09:52:44 +10:00
David Howden
e5e85d7360 Merge branch 'Simon-L-master' 2015-05-24 09:50:28 +10:00
Simon L
01fd433fb4 Added comments and links to ogg spec. Clarified code with const 2015-05-24 09:08:23 +10:00
Simon L
109d54c374 Adding slightly tested support for OGG, using VorbisComment parsing from flac.go 2015-05-19 21:56:05 +02:00
David Howden
e5ad564af4 Added Lyrics output to tag tool 2015-05-19 22:10:04 +10:00
David Howden
68d82a6107 Fix errors caused by incorrect delimiters 2015-05-19 22:09:51 +10:00
Xavier Henner
0f62dc116a Add support for lyrics.
Not supported in id3v1 and id3v22
2015-05-19 22:06:16 +10:00
David Howden
3c6f62d3e8 Merge pull request #5 from dhowden/revert-4-lyrics
Revert "Add support for lyrics."
2015-05-19 08:04:14 +10:00
David Howden
c895efbcf8 Revert "Add support for lyrics." 2015-05-19 08:03:36 +10:00
David Howden
90c5402ab5 Merge pull request #4 from xhenner/lyrics
Add support for lyrics.
2015-05-19 07:22:52 +10:00
Xavier Henner
0ae35897fa Typo, forgotten debug string and a missing comment 2015-05-18 09:56:47 +02:00
Xavier Henner
7fac753a70 Add support for lyrics.
Not supported in id3v1 and id3v22
2015-05-18 09:32:54 +02:00
David Howden
7a80548ea8 Add some basic tests for utils 2015-05-03 09:59:03 +10:00
David Howden
23cb126fb7 Add license comment to unsynchroniser tests 2015-05-03 09:58:40 +10:00
David Howden
0203dd6bc4 Tidy up unsynchroniser.Read some more 2015-05-03 09:58:13 +10:00