patch-xbmc_utils_SystemInfo_cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --- kodi-14.0rc2.orig/xbmc/utils/SystemInfo.cpp 2014-12-05 19:38:44.000000000 -0600
  2. +++ kodi-14.0rc2/xbmc/utils/SystemInfo.cpp 2014-12-07 23:48:19.332418001 -0600
  3. @@ -615,16 +615,11 @@ std::string CSysInfo::GetOsName(bool emp
  4. osName = "iOS";
  5. #elif defined(TARGET_DARWIN_OSX)
  6. osName = "OS X";
  7. -#elif defined (TARGET_ANDROID)
  8. +#elif defined(TARGET_ANDROID)
  9. osName = "Android";
  10. #elif defined(TARGET_LINUX)
  11. - osName = getValueFromOs_release("NAME");
  12. - if (osName.empty())
  13. - osName = getValueFromLsb_release(lsb_rel_distributor);
  14. - if (osName.empty())
  15. - osName = getValueFromOs_release("ID");
  16. -#endif // defined(TARGET_LINUX)
  17. -
  18. + osName = "OpenADK";
  19. +#endif
  20. if (osName.empty())
  21. osName = "Unknown OS";
  22. }
  23. @@ -665,7 +660,7 @@ std::string CSysInfo::GetOsVersion(void)
  24. #elif defined(TARGET_LINUX)
  25. osVersion = getValueFromOs_release("VERSION_ID");
  26. if (osVersion.empty())
  27. - osVersion = getValueFromLsb_release(lsb_rel_release);
  28. + osVersion = "1.0";
  29. #endif // defined(TARGET_LINUX)
  30. if (osVersion.empty())
  31. @@ -737,19 +732,7 @@ std::string CSysInfo::GetOsPrettyNameWit
  32. #elif defined(TARGET_ANDROID)
  33. osNameVer = GetOsName() + " " + GetOsVersion() + " API level " + StringUtils::Format("%d", CJNIBuild::SDK_INT);
  34. #elif defined(TARGET_LINUX)
  35. - osNameVer = getValueFromOs_release("PRETTY_NAME");
  36. - if (osNameVer.empty())
  37. - {
  38. - osNameVer = getValueFromLsb_release(lsb_rel_description);
  39. - std::string osName(GetOsName(true));
  40. - if (!osName.empty() && osNameVer.find(osName) == std::string::npos)
  41. - osNameVer = osName + osNameVer;
  42. - if (osNameVer.empty())
  43. - osNameVer = "Unknown Linux Distribution";
  44. - }
  45. -
  46. - if (osNameVer.find(GetOsVersion()) == std::string::npos)
  47. - osNameVer += " " + GetOsVersion();
  48. + osNameVer = GetOsName() + " " + GetOsVersion();
  49. #endif // defined(TARGET_LINUX)
  50. if (osNameVer.empty())