Commit Graph

99 Commits

Author SHA1 Message Date
Max Kellermann
a66051216f TagId3: add "pure" attributes 2014-12-02 22:17:47 +01:00
Max Kellermann
d93172bee8 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2014-11-28 19:09:56 +01:00
Max Kellermann
83fd822e8b ApeTag: drop support for non-standard tag "album artist"
This was used by proprietary software.  MPD adopted it a few years
ago, which turns out to be a mistake, because it now creates problems
for some MPD users (http://bugs.musicpd.org/view.php?id=4168).
2014-11-25 17:07:08 +01:00
Max Kellermann
c643b6ff16 configure.ac: add macro MPD_ENABLE_AUTO_PKG_LIB 2014-11-22 23:50:21 +01:00
Max Kellermann
b5ba94f1de tag/Set: do AlbumArtist/Artist fallback only if AlbumArtist is not disabled
On "list albumartist", songs that have no AlbumArtist tag will use the
Artist tag.  However, if AlbumArtist is disabled via
"metadata_to_use", the TagBuilder::AddItem() call is ignored, and
PrintUniqueTag() attempts to print a nullptr string.

This commit fixes the problem by attempting the fallback only if
AlbumArtist is not disabled.
2014-11-08 19:25:01 +01:00
Max Kellermann
666f700a93 TagString: implement fix_utf8() without GLib 2014-10-10 22:11:38 +02:00
Max Kellermann
b7a1954c33 TagString: return WritableBuffer<char> 2014-10-10 22:07:19 +02:00
Max Kellermann
6520589a37 TagString: use strndup() for unterminated string
Fixes buffer overflow bug.
2014-10-10 22:06:48 +02:00
Max Kellermann
f445b0178a TagString: remove ISO-Latin-1 fallback
MPD handles all strings in UTF-8 internally.  Those decoders which
read Latin-1 tags are supposed to implement the conversion, instead of
passing Latin-1 to TagBuilder::AddItem().  FixTagString() is simply
the wrong place to do that, and hard-coding Latin-1 is kind of
arbitrary.
2014-10-10 20:53:08 +02:00
Max Kellermann
3560dc4be6 Tag: support "AlbumSort"
The new tag is supported by all decoders that use the tag name table,
and the ID3v2 tag "TSOA" maps to it.
2014-09-29 18:55:59 +02:00
Wieland Hoffmann
5525ea45a4 Add MusicBrainz' Release Track Id tag
The Release Track Id uniquely identifies a recording on a release - that
is, even if a recording appears twice on a release (meaning that the
combination of recording and release id are not enough to figure out
which one it is), the release track id will allow differentiating the two.

The tag names are taken from
https://musicbrainz.org/doc/MusicBrainz_Picard/Tags/Mapping
2014-09-27 19:54:12 +02:00
Max Kellermann
8a7ff6a6fd decoder/flac: move code to tag/MixRamp.cxx 2014-09-24 22:44:58 +02:00
Max Kellermann
6c48aa5fae decoder/mad: move code to tag/MixRamp.cxx 2014-09-24 22:40:34 +02:00
Max Kellermann
441f9cc2ee tag/ReplayGain: add VorbisComment parser
Move code from the Vorbis and FLAC decoder plugins.
2014-09-24 22:21:13 +02:00
Max Kellermann
9f4fc8ad33 tag/ReplayGain: move code to template function 2014-09-24 22:19:55 +02:00
Max Kellermann
d1e31261fe decoder/{vorbis,flac}: move duplicate code to tag/VorbisComment.cxx 2014-09-24 21:50:42 +02:00
Max Kellermann
05dd9acba8 tag/ApeReplayGain, decoder/mad: move duplicate code to tag/ReplayGain.cxx 2014-09-24 21:50:34 +02:00
Max Kellermann
3158955198 TagHandler: pass SongTime to duration() 2014-08-29 22:52:04 +02:00
Max Kellermann
7c25d83f1c Tag: use SignedSongTime for the song duration 2014-08-29 13:20:58 +02:00
Max Kellermann
be36c0769a TagId3: fix printf string parameter 2014-07-30 22:02:46 +02:00
Max Kellermann
7a1f3177c9 util/Cast: reimplement as template without macro 2014-07-14 16:24:07 +02:00
Max Kellermann
41a7203c28 Tag: add class const_iterator and methods begin(), end()
Enables using range-based "for".
2014-07-12 17:22:39 +02:00
Max Kellermann
b2433a664c TagPool: move code to tag_value_slot_p() 2014-06-16 19:26:26 +02:00
Max Kellermann
adad4279f3 TagPool: convert macro to constexpr 2014-06-16 19:18:10 +02:00
Max Kellermann
ecc12c9ba1 db/Helpers: move code to tag/Set.cxx 2014-04-24 18:32:23 +02:00
Max Kellermann
9e50993c13 db/Helpers: move TagSet to dedicated header 2014-04-24 18:18:26 +02:00
Max Kellermann
2220651253 TagBuilder: add method AddEmptyItem() 2014-04-24 11:38:48 +02:00
Max Kellermann
07c1ba1f5e TagId3: disable charset conversion without GLib 2014-03-01 19:18:50 +01:00
Max Kellermann
4ad14f6a2c TagId3: use xstrdup() instead of g_strdup() 2014-02-17 22:42:54 +01:00
Max Kellermann
579e48edbb util/StringUtil: add function Strip()
Replaces g_strstrip().
2014-02-17 22:37:43 +01:00
Max Kellermann
6a08f2281a TagString: disable UTF-8 validation if GLib is disabled 2014-02-17 22:33:10 +01:00
Max Kellermann
197b503f3e Config*: move to config/ 2014-01-24 00:20:01 +01:00
Max Kellermann
bde27ccec3 Tag: pack attributes tighter
This saves another 3% memory.
2014-01-19 03:11:01 +01:00
Max Kellermann
a3f9abcbd1 SongFilter, TagConfig: cast TAG_NUM_OF_ITEM_TYPES to integer
Fixes clang warning.
2014-01-14 22:40:07 +01:00
Max Kellermann
4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann
970b10d01b tag/TagTable: add lookup TagType -> name 2014-01-09 19:01:03 +01:00
Max Kellermann
bc23a6bb05 tag/TagBuilder: overload Commit() returning a Tag object 2014-01-08 19:49:08 +01:00
Max Kellermann
ac1983eae3 tag/TagBuilder: rename Commit() to CommitNew() 2014-01-08 19:48:55 +01:00
Max Kellermann
27ca0db7a6 util/Alloc: new library replacing GLib's g_malloc() 2014-01-07 23:35:18 +01:00
Max Kellermann
fe6094a822 tag/TagPool: use NewVarSize() to allocate TagPoolSlot 2014-01-07 23:24:59 +01:00
Max Kellermann
8a30c7992d tag/TagPool: rename struct slot to TagPoolSlot 2014-01-07 23:12:24 +01:00
Max Kellermann
70eb9335bd tag/TagPool: use gcc_packed instead of mpd_packed
By accident, this declared a global variable instead of adding the
"packed" attribute.
2014-01-07 23:11:00 +01:00
Max Kellermann
0d20130d07 util/Cast: new utility library 2014-01-06 18:21:45 +01:00
Max Kellermann
64e898f6db release v0.18.6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSuWnsAAoJECNuiljG20US3qwP/0WGxzRFU2/dLzX6KG5/n+8R
 LqVeX7Ap7vLncA2UQQ2BiddPtF0u9lJOnex64pYCkwwpr4JBmkBa6kTKVGbbXDv5
 /tuHeUJk/aWhBJ8Qz/rxmNFBW6tNGlhf+7FVt8vHQqvHn7tWWKRlsQNk6Pd4gGM/
 UiMyuA8EtfTJZACPRRZK26H7g7EKIjsGt6vwiuWAh3MxGHWL5R2chuP5Mapi1U4U
 Qa1YOUAHlChRxGT+LmNMyKlgq+mqltbKQj+pOLPFuT6Q6BqgZp2Ept5Svod/JamC
 yCFRGWYsmRxZ0ZOhtRZACfm/yNzyIhkkvgW8FqM6tINOPrwL2MwAJVMVH3DZM7Aj
 /8ltz0OH2s9x9sUfOtxQkK/3bJpBwaDnl+dFQtGIFwigvYLR2Jv2Bl1zQO6+zICu
 bdbJS+IcOrElxTnxfir0CVEDysifUQ7/ZSQkwDqpF+RI8E07ZMZZLmXk3S2yX6Fx
 6dCwdfIsBAotF7RYsdn4cmRaSEx6Ze+aQr0l5yLh+5sKPEdDRSMrBEnCgPGU94ub
 VNl3Cp3dtq5kuSfJ90Mk0QzwVd/kCdKZKBMcTX2zv38NLcX0LCSylM4K9yCi+GR2
 gvgAJq9cmbmTEN3+grVdApNx0sqNFrD6pB27KhUKWD0VYypPu7yPPptkOWzSldbz
 8JGa8lryMbRmgiXVyivp
 =Z823
 -----END PGP SIGNATURE-----

Merge tag 'release-0.18.6'
2013-12-24 12:20:24 +01:00
Michal Smucr
e4d69f38b0 riff: recognize upper-case "ID3" chunk name
Some tagging libraries (eg. TagLib) produce that variant.
2013-12-19 09:35:54 +01:00
Max Kellermann
d43aa12987 Tag: swap "base" and "add" in method Merge()
Fixes broken CUE sheet song tags (regression by commmit 7e8d254b).
2013-12-13 15:53:58 +01:00
Max Kellermann
02fcf184b5 tag/ApeLoader: use new[]/delete[] instead of g_malloc()/g_free() 2013-12-04 15:21:10 +01:00
Max Kellermann
06a49a5f9e TagId3: make variables more local 2013-12-04 14:52:34 +01:00
Max Kellermann
b811927e0e TagId3: use std::string for partial string copy 2013-12-04 14:43:09 +01:00
Max Kellermann
83cdd0a0c8 TagId3: use free() instead of g_free() for libid3tag allocations 2013-12-04 14:39:30 +01:00