Merge pull request #25959 from neo1973/TagLib_deprecation_warnings
[xbmc.git] / lib / libUPnP / patches / 0031-platinum-only-apply-Xbox-specific-friendlyName-restr.patch
blobd397ee72d989b9df24c6297f8e406bddb05ecea1
1 From 9916c3e60b5924cd36bb4018e3723659cc077e23 Mon Sep 17 00:00:00 2001
2 From: montellese <montellese@xbmc.org>
3 Date: Sat, 2 Aug 2014 20:57:46 +0200
4 Subject: [PATCH] platinum: only apply Xbox specific "friendlyName"
5 restrictions to Xbox clients
7 ---
8 .../Source/Devices/MediaConnect/PltMediaConnect.cpp | 15 ++++++++++-----
9 1 file changed, 10 insertions(+), 5 deletions(-)
11 diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaConnect/PltMediaConnect.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaConnect/PltMediaConnect.cpp
12 index f948dd1..32503fe 100644
13 --- a/lib/libUPnP/Platinum/Source/Devices/MediaConnect/PltMediaConnect.cpp
14 +++ b/lib/libUPnP/Platinum/Source/Devices/MediaConnect/PltMediaConnect.cpp
15 @@ -117,11 +117,16 @@ PLT_MediaConnect::ProcessGetDescription(NPT_HttpRequest& request,
17 PLT_DeviceSignature signature = PLT_HttpHelper::GetDeviceSignature(request);
19 - // XBox needs to see something behind a ':' to even show it
20 - if (m_AddHostname && hostname.GetLength() > 0) {
21 - m_FriendlyName += ": " + hostname;
22 - } else if (m_FriendlyName.Find(":") == -1) {
23 - m_FriendlyName += ": 1";
24 + if (signature == PLT_DEVICE_XBOX_360 || signature == PLT_DEVICE_XBOX_ONE /*|| signature == PLT_SONOS*/) {
25 + // XBox needs to see something behind a ':' to even show it
26 + if (m_AddHostname && hostname.GetLength() > 0) {
27 + m_FriendlyName += ": " + hostname;
28 + } else if (m_FriendlyName.Find(":") == -1) {
29 + m_FriendlyName += ": 1";
30 + }
31 + }
32 + else if (m_AddHostname && hostname.GetLength() > 0) {
33 + m_FriendlyName += " (" + hostname + ")";
36 // change some things based on device signature from request
37 --
38 1.7.11.msysgit.0