Commit Graph

94 Commits

Author SHA1 Message Date
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 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
Max Kellermann 53c69cd2ce TagId3: use new[]/delete[] instead of g_malloc()/g_free() 2013-12-04 14:36:13 +01:00
Max Kellermann c6cf8e992d TagId3: gcc_unlikely instead of G_UNLIKELY 2013-12-04 14:35:16 +01:00
Max Kellermann d694150372 Tag: destructor calls Clear()
Eliminate duplicate code.
2013-12-03 13:19:45 +01:00
Max Kellermann 4ab586aaf1 Tag: use new[]/delete[] instead of g_new()/g_free() 2013-12-03 13:16:43 +01:00
Max Kellermann 8a5209ad93 Tag: remove method AddItem()
Use class TagBuilder instead.
2013-12-03 13:15:42 +01:00