Package: kodi / 2:21.2+dfsg-4

kodi/0003-differentiate-from-vanilla-Kodi.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
From d7ce565e1de5515afab869f8d1de35840567af7a Mon Sep 17 00:00:00 2001
From: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Date: Wed, 26 Feb 2020 13:48:55 +0100
Subject: [PATCH] differentiate-from-vanilla-Kodi
Forwarded: not-needed

---
 addons/skin.estuary/xml/Home.xml   |  8 ++++++++
 xbmc/utils/SystemInfo.cpp          | 12 ++++++++----
 xbmc/utils/test/TestSystemInfo.cpp |  2 +-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/addons/skin.estuary/xml/Home.xml b/addons/skin.estuary/xml/Home.xml
index 3cd090d7..e9bf8774 100644
--- a/addons/skin.estuary/xml/Home.xml
+++ b/addons/skin.estuary/xml/Home.xml
@@ -1090,6 +1090,14 @@
 						<param name="visible" value="Player.HasMedia + Player.IsRemote + !Player.HasAudio" />
 					</include>
 				</control>
+		                <control type="image">
+			          <left>140</left>
+				  <top>71</top>
+			          <width>250</width>
+				  <height>56</height>
+			          <aspectratio>keep</aspectratio>
+			          <texture>from-debian-logo.png</texture>
+		                </control>
 			</control>
 			<include>BottomBar</include>
 			<control type="group">
diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp
index 92ef021e..52f80815 100644
--- a/xbmc/utils/SystemInfo.cpp
+++ b/xbmc/utils/SystemInfo.cpp
@@ -75,6 +75,9 @@ using namespace winrt::Windows::System::Profile;
 
 #include <system_error>
 
+#include <algorithm>
+#include <cctype>
+
 /* Expand macro before stringify */
 #define STR_MACRO(x) #x
 #define XSTR_MACRO(x) STR_MACRO(x)
@@ -521,7 +524,7 @@ bool CSysInfo::Save(TiXmlNode *settings) const
 const std::string& CSysInfo::GetAppName(void)
 {
   assert(CCompileInfo::GetAppName() != NULL);
-  static const std::string appName(CCompileInfo::GetAppName());
+  static const std::string appName(StringUtils::Format("{} from Debian", CCompileInfo::GetAppName()));
 
   return appName;
 }
@@ -1175,7 +1178,9 @@ std::string CSysInfo::GetUserAgent()
   if (!result.empty())
     return result;
 
-  result = GetAppName() + "/" + CSysInfo::GetVersionShort() + " (";
+  std::string appName = GetAppName();
+  appName.erase(std::remove_if(appName.begin(), appName.end(), ::isspace), appName.end());
+  result = appName + "/" + CSysInfo::GetVersionShort() + " (";
 #if defined(TARGET_WINDOWS)
   result += GetKernelName() + " " + GetKernelVersion();
 #ifndef TARGET_WINDOWS_STORE
@@ -1344,8 +1349,7 @@ std::string CSysInfo::GetVersionShort()
 
 std::string CSysInfo::GetVersion()
 {
-  return GetVersionShort() + " (" + CCompileInfo::GetVersionCode() + ")" +
-         " Git:" + CCompileInfo::GetSCMID();
+  return GetVersionShort() + StringUtils::Format(" Debian package version: {}", DEB_VERSION);
 }
 
 std::string CSysInfo::GetVersionCode()
diff --git a/xbmc/utils/test/TestSystemInfo.cpp b/xbmc/utils/test/TestSystemInfo.cpp
index 9a1f05ee..e91f572b 100644
--- a/xbmc/utils/test/TestSystemInfo.cpp
+++ b/xbmc/utils/test/TestSystemInfo.cpp
@@ -214,7 +214,7 @@ TEST_F(TestSystemInfo, GetXbmcBitness)
 
 TEST_F(TestSystemInfo, GetUserAgent)
 {
-  EXPECT_STREQ(g_sysinfo.GetAppName().c_str(), g_sysinfo.GetUserAgent().substr(0, g_sysinfo.GetAppName().size()).c_str()) << "'GetUserAgent()' string must start with app name'";
+  // EXPECT_STREQ(g_sysinfo.GetAppName().c_str(), g_sysinfo.GetUserAgent().substr(0, g_sysinfo.GetAppName().size()).c_str()) << "'GetUserAgent()' string must start with app name'";
   EXPECT_NE(std::string::npos, g_sysinfo.GetUserAgent().find('(')) << "'GetUserAgent()' must contain brackets around second parameter";
   EXPECT_NE(std::string::npos, g_sysinfo.GetUserAgent().find(')')) << "'GetUserAgent()' must contain brackets around second parameter";
   EXPECT_EQ(g_sysinfo.GetUserAgent().find(' '), g_sysinfo.GetUserAgent().find(" (")) << "Second parameter in 'GetUserAgent()' string must be in brackets";
-- 
2.27.0.rc2