Commit Graph

439 Commits

Author SHA1 Message Date
Miguel A. Arroyo e3809bd4f0 feat: Add ShowMovement Tag
This commit adds the `SHOWMOVEMENT` [tag](https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#show-work-movement-4). Historically, this tag originates from iTunes' MP4, but has since become widely used. It is created by Picard's Classical music [plugins](https://picard-docs.musicbrainz.org/en/variables/variables_classical.html) (such as "Classical Extras" or "Work & Movement").

The reasoning behind this tag is to display Work & Movement titles without redundant information and in a more uniform way. Moreover, it additionally serves as an implicit marker denoting classical music tracks (genre tags aren't sufficient).

If the client so chooses to support this tag, they can display `Work` and `Movement` instead of the track title allowing for cleaner display. Other clients can continue to display the `%title%` as before without any fuss.
2024-07-23 21:09:31 -07:00
Max Kellermann 3229da48e3 tag/Mask: pass 64 bit integer to constructor, prevent truncation
Commit f49d4ef4ad changed the bit mask size to 64 bit, but I forgot
to change the constructor as well.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/2057
2024-07-08 15:34:27 +02:00
Max Kellermann 381215fd73 *: use std::scoped_lock with implicit template parameter 2024-05-23 20:54:49 +02:00
Max Kellermann 34f7b38f39 input/InputStream: pass std::span<std::byte> to Read() 2024-05-13 12:28:40 +02:00
Max Kellermann 0c1ecc96a8 *: let libfmt quote strings 2024-04-16 11:50:18 +02:00
Max Kellermann 6a99f20828 util/IntrusiveHashSet: add concept checks to *Operators
This requires adding another template argument and reordering the others.
2024-04-03 21:27:37 +02:00
Max Kellermann 393d57b387 util/NumberParser: rename to CNumberParser
A new NumberParser library based on std::from_chars() will be added.
2024-01-04 21:02:45 +01:00
Max Kellermann 23b4688c44 util/ByteOrder: move Packed* classes to separate headers 2023-12-22 18:20:46 +01:00
Max Kellermann 3c5b864396 tag/IcyMetadataParser: use std::span 2023-12-21 08:42:23 +01:00
Max Kellermann 58fc857a2d tag/IcyMetadataParser: pass std::string_view to icy_parse_tag() 2023-12-20 20:18:39 +01:00
Max Kellermann e443ee357a tag/IcyMetadataParser: do not null-terminate strings in icy_parse_tag()
Just pass std::string_views into the unmodified buffer to
icy_parse_tag_item().
2023-12-20 19:58:35 +01:00
Max Kellermann 2618294eb7 tag/IcyMetadataParser: pass std::string_view to icy_parse_tag_item() 2023-12-20 19:51:22 +01:00
Max Kellermann 03352cb4ad tag/IcyMetadataParser: use std::byte in ParseInPlace() 2023-12-20 19:49:08 +01:00
Max Kellermann 70ac638d93 tag/Mask: make everything `constexpr` 2023-10-15 11:03:56 +02:00
Max Kellermann f49d4ef4ad tag/Mask: switch to 64 bit because have we 34 tags now and 32 bits are not enough 2023-10-08 10:02:50 +02:00
Max Kellermann 2859845567 Merge branch 'v0.23.x' 2023-10-08 10:02:19 +02:00
Max Kellermann f3c37e484e tag/Mask: add static_assert on the size of the mask 2023-10-08 10:01:00 +02:00
Max Kellermann 75aa08ed6b tag/Pool: use a power-of-2 hash table size
This is simpler to calculate and the advantage of using a prime is
negligible anyway.
2023-09-11 21:23:11 +02:00
Max Kellermann c8dc1e0665 tag/Pool: use class IntrusiveHashSet intead of rolling a custom hash table 2023-09-11 21:15:28 +02:00
Max Kellermann c391adad10 tag/Pool: move code from calc_hash() to util/djb_hash.cxx 2023-09-11 20:53:37 +02:00
Max Kellermann f578b06d83 tag/Pool: move calc_hash() returns std::size_t 2023-09-11 20:51:44 +02:00
Max Kellermann 0748f75d9b tag/Pool: rename `TagPoolSlot` to `TagPoolItem` 2023-09-11 20:44:55 +02:00
Max Kellermann 3e09f95b40 tag/Pool: enable option `zero_initialized`
Commit 44beae519d caused the MPD
executable to grow by more than 1 MB because the `slots` array
suddenly was not zero-initialized anymore, because the doubly-linked
list is circular, while the singly-linked list is zero-terminated.

This option moves the array back to the `bss` section.
2023-09-11 20:32:26 +02:00
Max Kellermann a573d57de8 tag/Builder: remove unnecessary explicit AddItem() overload 2023-09-06 16:10:31 +02:00
Max Kellermann 44beae519d tag/Pool: use doubly-linked list
This adds some memory overhead but eliminates the linear search from
tag_pool_put_item().
2023-09-06 16:00:25 +02:00
Max Kellermann b896711fc6 tag/Pool: fix crash in tag_pool_put_item()
Regression by commit 76bdfabcc5
2023-09-06 15:53:17 +02:00
Max Kellermann 76bdfabcc5 tag/Pool: use class IntrusiveForwardList 2023-09-06 15:33:26 +02:00
Max Kellermann 6c48f5ac63 tag/Pool: use std::array 2023-09-06 15:10:47 +02:00
jcorporation 082f72dd20 Add support of TAG_MUSICBRAINZ_RELEASEGROUPID
Closes #1767
2023-07-12 19:43:37 +02:00
Max Kellermann 42f6a0441c use [[gnu::...]] attributes 2023-03-06 16:14:15 +01:00
Max Kellermann 7a46c57ef3 tag/Type: require C++ 2023-03-06 15:28:44 +01:00
Max Kellermann 118b76a8f1 db/Interface, ...: forward-declare TagType 2023-03-06 15:25:30 +01:00
Max Kellermann a302d34f6d tag/Names: convert to C++ 2023-03-06 15:16:33 +01:00
Max Kellermann 148aca23be use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Max Kellermann c122e990a3 Merge branch 'master' of https://github.com/faceless2/MPD 2023-01-17 19:03:49 +01:00
Mike Bremford b96e44b362 Unlike album, artist and albumartist, title and composer were not used as a fallback
when titlesort and composersort were specified but unavailable - this patch fixes that.
2023-01-09 18:15:44 +00:00
Max Kellermann 8a7b7dffec Merge branch 'v0.23.x' 2023-01-06 08:12:38 +01:00
gd abb28593ce TagBuilder::RemoveType: added missing tag pool lock before call to tag_pool_put_item 2022-12-29 08:43:10 +01:00
Max Kellermann fa58db798b lib/fmt/RuntimeError: new library
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
gd a1359f2388 TagBuilder: skip unnecessary preperation if there are no items to add 2022-11-01 17:55:42 +02:00
gd ab687481cc Tag: skip tag pool lock if there are no items 2022-11-01 15:37:54 +02:00
Sonico 3ef83cc34e Add titleSort tag 2022-07-20 23:05:10 -03:00
Max Kellermann cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann 683f0da2e7 tag/*: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann 0727ee94c0 tag/Id3Scan: use std::string_view 2022-07-01 11:29:10 +02:00
Max Kellermann 4a97c45585 tag/Config: use IterableSplitString instead of SplitString() 2022-06-30 20:39:39 +02:00
Max Kellermann a7b7e35512 tag/ReplayGainParser: use std::string_view 2022-06-30 10:59:56 +02:00
Max Kellermann 11135b48e6 tag/MixRampParser: use std::string_view 2022-06-30 10:59:27 +02:00
Max Kellermann d0382caa88 tag/ApeLoader: use std::string_view 2022-06-30 10:58:22 +02:00
Max Kellermann 4765726bda tag/VorbisComment: use std::string_view 2022-06-30 10:57:01 +02:00