]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add "Protocol" property -- AirPlay or AirPlay 2.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 6 Aug 2022 18:33:09 +0000 (19:33 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 6 Aug 2022 18:33:09 +0000 (19:33 +0100)
dbus-service.c
org.gnome.ShairportSync.xml

index 6b488bab325350e78e1686589b09fa93433c9e8c..e51330bfd882069c23828e66226a278f26fe4583 100644 (file)
@@ -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);
index 2fb9c8e9df17b2f394e22f21a7eb87329f4f5224..efa00fd00e0b87e3c2d57b5db4531c04bf754c5a 100644 (file)
@@ -22,6 +22,7 @@
     <property name="ALACDecoder" type="s" access="readwrite" />
     <property name="Version" type="s" access="read" />
     <property name="VersionString" type="s" access="read" />
+    <property name="Protocol" type="s" access="read" />
   </interface>
   <interface name="org.gnome.ShairportSync.Diagnostics">
     <property name="Verbosity" type="i" access="readwrite" />