summaryrefslogtreecommitdiff
path: root/package/kodi/patches/patch-xbmc_utils_SystemInfo_cpp
blob: a9746c03bf4b741551a4dd5ea450b1c413e356cd (plain)
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
--- xbmc-16.0-Jarvis.orig/xbmc/utils/SystemInfo.cpp	2016-02-20 16:21:19.000000000 +0100
+++ xbmc-16.0-Jarvis/xbmc/utils/SystemInfo.cpp	2016-03-14 04:38:00.092253459 +0100
@@ -614,16 +614,11 @@ std::string CSysInfo::GetOsName(bool emp
     osName = "iOS";
 #elif defined(TARGET_DARWIN_OSX)
     osName = "OS X";
-#elif defined (TARGET_ANDROID)
+#elif defined(TARGET_ANDROID)
     osName = "Android";
 #elif defined(TARGET_LINUX)
-    osName = getValueFromOs_release("NAME");
-    if (osName.empty())
-      osName = getValueFromLsb_release(lsb_rel_distributor);
-    if (osName.empty())
-      osName = getValueFromOs_release("ID");
-#endif // defined(TARGET_LINUX)
-
+    osName = "OpenADK";
+#endif
     if (osName.empty())
       osName = "Unknown OS";
   }
@@ -664,7 +659,7 @@ std::string CSysInfo::GetOsVersion(void)
 #elif defined(TARGET_LINUX)
   osVersion = getValueFromOs_release("VERSION_ID");
   if (osVersion.empty())
-    osVersion = getValueFromLsb_release(lsb_rel_release);
+    osVersion = "1.0";
 #endif // defined(TARGET_LINUX)
 
   if (osVersion.empty())
@@ -742,19 +737,7 @@ std::string CSysInfo::GetOsPrettyNameWit
 #elif defined(TARGET_ANDROID)
   osNameVer = GetOsName() + " " + GetOsVersion() + " API level " +   StringUtils::Format("%d", CJNIBuild::SDK_INT);
 #elif defined(TARGET_LINUX)
-  osNameVer = getValueFromOs_release("PRETTY_NAME");
-  if (osNameVer.empty())
-  {
-    osNameVer = getValueFromLsb_release(lsb_rel_description);
-    std::string osName(GetOsName(true));
-    if (!osName.empty() && osNameVer.find(osName) == std::string::npos)
-      osNameVer = osName + osNameVer;
-    if (osNameVer.empty())
-      osNameVer = "Unknown Linux Distribution";
-  }
-
-  if (osNameVer.find(GetOsVersion()) == std::string::npos)
-    osNameVer += " " + GetOsVersion();
+  osNameVer = GetOsName() + " " + GetOsVersion();
 #endif // defined(TARGET_LINUX)
 
   if (osNameVer.empty())