Default to receiving metadata the older "classic" way for compatibility. Add a temporary setting to change this in the "diagnostics" part of the configuration file.

This commit is contained in:
Mike Brady
2026-07-23 18:40:06 +02:00
parent a93e187ebc
commit 6ba8e3107d
3 changed files with 24 additions and 5 deletions
+2
View File
@@ -193,6 +193,8 @@ typedef struct {
double resend_control_check_interval_time; // wait this long between making requests double resend_control_check_interval_time; // wait this long between making requests
double resend_control_last_check_time; // if the packet is missing this close to the time of use, double resend_control_last_check_time; // if the packet is missing this close to the time of use,
// give up // give up
int get_plist_metadata; // set to non-zero to get richer plist metadata
pthread_mutex_t lock; pthread_mutex_t lock;
config_t *cfg; config_t *cfg;
int endianness; int endianness;
+1
View File
@@ -399,4 +399,5 @@ diagnostics =
// log_show_time_since_last_message = "yes"; // set this to yes if you want the time since the last debug message in the debug message -- seconds down to nanoseconds // log_show_time_since_last_message = "yes"; // set this to yes if you want the time since the last debug message in the debug message -- seconds down to nanoseconds
// drop_this_fraction_of_audio_packets = 0.0; // use this to simulate a noisy network where this fraction of UDP packets are lost in transmission. E.g. a value of 0.001 would mean an average of 0.1% of packets are lost, which is actually quite a high figure. // drop_this_fraction_of_audio_packets = 0.0; // use this to simulate a noisy network where this fraction of UDP packets are lost in transmission. E.g. a value of 0.001 would mean an average of 0.1% of packets are lost, which is actually quite a high figure.
// retain_cover_art = "no"; // artwork is deleted when its corresponding track has been played. Set this to "yes" to retain all artwork permanently. Warning -- your directory might fill up. // retain_cover_art = "no"; // artwork is deleted when its corresponding track has been played. Set this to "yes" to retain all artwork permanently. Warning -- your directory might fill up.
// get_plist_metadata = "no"; // set this temporary setting to "yes" to get the new richer metadata stream.
}; };
+21 -5
View File
@@ -773,6 +773,17 @@ int parse_options(int argc, char **argv) {
"inclusive.", "inclusive.",
value); value);
} }
if (config_lookup_string(config.cfg, "diagnostics.get_plist_metadata", &str)) {
if (strcasecmp(str, "no") == 0)
config.get_plist_metadata = 0;
else if (strcasecmp(str, "yes") == 0)
config.get_plist_metadata = 1;
else
die("Invalid \"get_plist_metadata\" option choice \"%s\". It should be \"yes\" or "
"\"no\"",
str);
}
/* Get the verbosity setting. */ /* Get the verbosity setting. */
if (config_lookup_int(config.cfg, "diagnostics.log_verbosity", &value)) { if (config_lookup_int(config.cfg, "diagnostics.log_verbosity", &value)) {
@@ -1637,17 +1648,22 @@ int parse_options(int argc, char **argv) {
// provides much more information, so should be the default for AirPlay 2 // provides much more information, so should be the default for AirPlay 2
if (config.metadata_enabled != 0) { if (config.metadata_enabled != 0) {
config.airplay_features |= if (config.get_plist_metadata != 0) {
(uint64_t)1 << 50; // metadata in a binary plist, including more state information config.airplay_features |=
// config.airplay_features |= ((uint64_t)1 << 15) | ((uint64_t)1 << 16) | ((uint64_t)1 << 17); (uint64_t)1 << 50; // richer metadata in a binary plist, including more state information
// // older metadata flags artwork, progress and text respectively } else {
// older metadata flags artwork, progress and text respectively
config.airplay_features |= (((uint64_t)1 << 16) | ((uint64_t)1 << 17));
if (config.get_coverart != 0)
config.airplay_features |= ((uint64_t)1 << 15);
}
} }
#endif #endif
// now generate the fex field // now generate the fex field
uint8_t fexbytes[8]; uint8_t fexbytes[8];
uint64_t temp = config.airplay_features; uint64_t temp = config.airplay_features;
debug(2, "airplay_features are %" PRIx64 ".", temp); debug(1, "airplay_features are %" PRIx64 ".", temp);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
fexbytes[i] = temp & 0xff; fexbytes[i] = temp & 0xff;
temp = temp >> 8; temp = temp >> 8;