From d5fafa13405dd38ba5b595549bbc2a102cdab3e8 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 6 Mar 2023 07:47:55 +0100
Subject: [PATCH] output/PipeWire: map tags "Date" and "Comment"

---
 NEWS                                        | 2 ++
 src/output/plugins/PipeWireOutputPlugin.cxx | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/NEWS b/NEWS
index 4b887ccfb..3882b48a2 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ ver 0.24 (not yet released)
   - "one-shot" consume mode
 * tags
   - new tags "TitleSort", "Mood"
+* output
+  - pipewire: map tags "Date" and "Comment"
 * switch to C++20
   - GCC 10 or clang 11 (or newer) recommended
 * static partition configuration
diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx
index 6be54f4c8..aa9fef311 100644
--- a/src/output/plugins/PipeWireOutputPlugin.cxx
+++ b/src/output/plugins/PipeWireOutputPlugin.cxx
@@ -945,6 +945,8 @@ PipeWireOutput::SendTag(const Tag &tag)
 	} tag_map[] = {
 		{ TAG_ARTIST, PW_KEY_MEDIA_ARTIST },
 		{ TAG_TITLE, PW_KEY_MEDIA_TITLE },
+		{ TAG_DATE, PW_KEY_MEDIA_DATE },
+		{ TAG_COMMENT, PW_KEY_MEDIA_COMMENT },
 	};
 
 	struct spa_dict_item items[1 + std::size(tag_map)];