From: Mike Brady <4265913+mikebrady@users.noreply.github.com>
Date: Sat, 6 Aug 2022 18:33:09 +0000 (+0100)
Subject: Add "Protocol" property -- AirPlay or AirPlay 2.
X-Git-Tag: 4.1-rc1~24^2~45
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=720a271eecdcf9cbb750d5569288fd7533dd2f61;p=thirdparty%2Fshairport-sync.git
Add "Protocol" property -- AirPlay or AirPlay 2.
---
diff --git a/dbus-service.c b/dbus-service.c
index 6b488bab..e51330bf 100644
--- a/dbus-service.c
+++ b/dbus-service.c
@@ -1,6 +1,6 @@
/*
* This file is part of Shairport Sync.
- * Copyright (c) Mike Brady 2018 -- 2019
+ * Copyright (c) Mike Brady 2018 -- 2022
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
@@ -1009,6 +1009,12 @@ static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name
// NULL);
#endif
+#ifdef CONFIG_AIRPLAY_2
+ shairport_sync_set_protocol(SHAIRPORT_SYNC(shairportSyncSkeleton), "AirPlay 2");
+#else
+ shairport_sync_set_protocol(SHAIRPORT_SYNC(shairportSyncSkeleton), "AirPlay");
+#endif
+
shairport_sync_set_version(SHAIRPORT_SYNC(shairportSyncSkeleton), PACKAGE_VERSION);
char *vs = get_version_string();
shairport_sync_set_version_string(SHAIRPORT_SYNC(shairportSyncSkeleton), vs);
diff --git a/org.gnome.ShairportSync.xml b/org.gnome.ShairportSync.xml
index 2fb9c8e9..efa00fd0 100644
--- a/org.gnome.ShairportSync.xml
+++ b/org.gnome.ShairportSync.xml
@@ -22,6 +22,7 @@
+