forked from osmc/osmc
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e74a16b
commit 1bd5f11
Showing
15 changed files
with
15,702 additions
and
0 deletions.
There are no files selected for viewing
1,592 changes: 1,592 additions & 0 deletions
1,592
package/mediacenter-next-osmc/patches/rbp-301-pull-16261.patch
Large diffs are not rendered by default.
Oops, something went wrong.
5,743 changes: 5,743 additions & 0 deletions
5,743
package/mediacenter-next-osmc/patches/rbp-301-pull-16453.patch
Large diffs are not rendered by default.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
package/mediacenter-next-osmc/patches/rbp-301-pull-16707.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From d24f08bac393530e6465b0ab4f02d8bb521dd36c Mon Sep 17 00:00:00 2001 | ||
From: ronie <ronie@kodi.tv> | ||
Date: Thu, 3 Oct 2019 12:29:21 +0200 | ||
Subject: [PATCH] System.HasAddon() - return true for disabled addons | ||
|
||
--- | ||
xbmc/GUIInfoManager.cpp | 1 + | ||
xbmc/guilib/guiinfo/AddonsGUIInfo.cpp | 2 +- | ||
2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp | ||
index beb4df13c18d..dcbbb468cf1d 100644 | ||
--- a/xbmc/GUIInfoManager.cpp | ||
+++ b/xbmc/GUIInfoManager.cpp | ||
@@ -1704,6 +1704,7 @@ const infomap system_labels[] = {{ "hasnetwork", SYSTEM_ETHERNET_LINK_ACT | ||
/// _boolean_, | ||
/// @return **True** if the specified addon is installed on the system. | ||
/// @param id - the addon id | ||
+/// @skinning_v19 **[Boolean Condition Updated]** \link System_HasAddon `System.HasAddon(id)`\endlink | ||
/// <p> | ||
/// } | ||
/// \table_row3{ <b>`System.AddonIsEnabled(id)`</b>, | ||
diff --git a/xbmc/guilib/guiinfo/AddonsGUIInfo.cpp b/xbmc/guilib/guiinfo/AddonsGUIInfo.cpp | ||
index 611078098113..f4c610907fb2 100644 | ||
--- a/xbmc/guilib/guiinfo/AddonsGUIInfo.cpp | ||
+++ b/xbmc/guilib/guiinfo/AddonsGUIInfo.cpp | ||
@@ -165,7 +165,7 @@ bool CAddonsGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context | ||
case SYSTEM_HAS_ADDON: | ||
{ | ||
ADDON::AddonPtr addon; | ||
- value = CServiceBroker::GetAddonMgr().GetAddon(info.GetData3(), addon) && addon; | ||
+ value = CServiceBroker::GetAddonMgr().IsAddonInstalled(info.GetData3()); | ||
return true; | ||
} | ||
case SYSTEM_ADDON_IS_ENABLED: |
177 changes: 177 additions & 0 deletions
177
package/mediacenter-next-osmc/patches/rbp-301-pull-16710.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
From c61cb9ad52b717d2cf46143e0e8e77ba40040aa8 Mon Sep 17 00:00:00 2001 | ||
From: fuzzard <bmurphy@bcmcs.net> | ||
Date: Sun, 8 Sep 2019 14:01:51 +1000 | ||
Subject: [PATCH] [darwin] apply modernize obj-c to darwin common platform code | ||
|
||
Applies xcode's modernize obj-c syntax conversion | ||
--- | ||
xbmc/platform/darwin/DarwinUtils.mm | 20 ++++++------- | ||
.../darwin/ios-common/AnnounceReceiver.mm | 30 +++++++++---------- | ||
2 files changed, 25 insertions(+), 25 deletions(-) | ||
|
||
diff --git a/xbmc/platform/darwin/DarwinUtils.mm b/xbmc/platform/darwin/DarwinUtils.mm | ||
index e18651b36c31..a0b80293e2a3 100644 | ||
--- a/xbmc/platform/darwin/DarwinUtils.mm | ||
+++ b/xbmc/platform/darwin/DarwinUtils.mm | ||
@@ -39,9 +39,9 @@ | ||
#if defined(TARGET_DARWIN_EMBEDDED) | ||
// Gets a string with the device model | ||
size_t size; | ||
- sysctlbyname("hw.machine", NULL, &size, NULL, 0); | ||
+ sysctlbyname("hw.machine", nullptr, &size, nullptr, 0); | ||
char machine[size]; | ||
- if (sysctlbyname("hw.machine", machine, &size, NULL, 0) == 0 && machine[0]) | ||
+ if (sysctlbyname("hw.machine", machine, &size, nullptr, 0) == 0 && machine[0]) | ||
iOSPlatformString.assign(machine, size-1); | ||
else | ||
#endif | ||
@@ -57,9 +57,9 @@ | ||
std::call_once(flag, [] | ||
{ | ||
size_t size; | ||
- sysctlbyname("kern.osrelease", NULL, &size, NULL, 0); | ||
+ sysctlbyname("kern.osrelease", nullptr, &size, nullptr, 0); | ||
char osrelease[size]; | ||
- sysctlbyname("kern.osrelease", osrelease, &size, NULL, 0); | ||
+ sysctlbyname("kern.osrelease", osrelease, &size, nullptr, 0); | ||
osreleaseStr.assign(osrelease); | ||
}); | ||
return osreleaseStr.c_str(); | ||
@@ -69,7 +69,7 @@ | ||
{ | ||
@autoreleasepool | ||
{ | ||
- return [[[NSProcessInfo processInfo] operatingSystemVersionString] UTF8String]; | ||
+ return NSProcessInfo.processInfo.operatingSystemVersionString.UTF8String; | ||
} | ||
} | ||
|
||
@@ -80,7 +80,7 @@ | ||
#if defined(TARGET_DARWIN_EMBEDDED) | ||
std::call_once(flag, [] | ||
{ | ||
- versionString.assign([[[UIDevice currentDevice] systemVersion] UTF8String]); | ||
+ versionString.assign(UIDevice.currentDevice.systemVersion.UTF8String); | ||
}); | ||
#else | ||
std::call_once(flag, [] | ||
@@ -224,19 +224,19 @@ bool CFStringRefToStringWithEncoding(CFStringRef source, std::string &destinatio | ||
{ | ||
CFIndex strLen = CFStringGetMaximumSizeForEncoding(CFStringGetLength(source) + 1, | ||
encoding); | ||
- char *allocStr = (char*)malloc(strLen); | ||
+ char* allocStr = static_cast<char*>(malloc(strLen)); | ||
|
||
if(!allocStr) | ||
return false; | ||
|
||
if(!CFStringGetCString(source, allocStr, strLen, encoding)) | ||
{ | ||
- free((void*)allocStr); | ||
+ free(static_cast<void*>(allocStr)); | ||
return false; | ||
} | ||
|
||
destination = allocStr; | ||
- free((void*)allocStr); | ||
+ free(static_cast<void*>(allocStr)); | ||
|
||
return true; | ||
} | ||
@@ -285,7 +285,7 @@ bool CFStringRefToStringWithEncoding(CFStringRef source, std::string &destinatio | ||
manufName = static_cast<const char*>([NSString stringWithString:(__bridge NSString*)manufacturer].UTF8String); | ||
else if (typeId == CFDataGetTypeID()) | ||
{ | ||
- manufName.assign((const char*)CFDataGetBytePtr((CFDataRef)manufacturer), CFDataGetLength((CFDataRef)manufacturer)); | ||
+ manufName.assign(reinterpret_cast<const char*>(CFDataGetBytePtr((CFDataRef)manufacturer)), CFDataGetLength((CFDataRef)manufacturer)); | ||
if (!manufName.empty() && manufName[manufName.length() - 1] == 0) | ||
manufName.erase(manufName.length() - 1); // remove extra null at the end if any | ||
} | ||
diff --git a/xbmc/platform/darwin/ios-common/AnnounceReceiver.mm b/xbmc/platform/darwin/ios-common/AnnounceReceiver.mm | ||
index c4ce4634bd60..9ac3a4e8ca1b 100644 | ||
--- a/xbmc/platform/darwin/ios-common/AnnounceReceiver.mm | ||
+++ b/xbmc/platform/darwin/ios-common/AnnounceReceiver.mm | ||
@@ -42,7 +42,7 @@ | ||
return nil; | ||
NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithCapacity:data.size()]; | ||
for (CVariant::const_iterator_map itr = data.begin_map(); itr != data.end_map(); ++itr) | ||
- [dict setValue:objectFromVariant(itr->second) forKey:[NSString stringWithUTF8String:itr->first.c_str()]]; | ||
+ [dict setValue:objectFromVariant(itr->second) forKey:@(itr->first.c_str())]; | ||
|
||
return dict; | ||
} | ||
@@ -52,17 +52,17 @@ id objectFromVariant(const CVariant &data) | ||
if (data.isNull()) | ||
return nil; | ||
if (data.isString()) | ||
- return [NSString stringWithUTF8String:data.asString().c_str()]; | ||
+ return @(data.asString().c_str()); | ||
if (data.isWideString()) | ||
- return [NSString stringWithCString:(const char *)data.asWideString().c_str() encoding:NSUnicodeStringEncoding]; | ||
+ return [NSString stringWithCString:(const char*)data.asWideString().c_str() encoding:NSUnicodeStringEncoding]; | ||
if (data.isInteger()) | ||
- return [NSNumber numberWithLongLong:data.asInteger()]; | ||
+ return @(data.asInteger()); | ||
if (data.isUnsignedInteger()) | ||
- return [NSNumber numberWithUnsignedLongLong:data.asUnsignedInteger()]; | ||
+ return @(data.asUnsignedInteger()); | ||
if (data.isBoolean()) | ||
- return [NSNumber numberWithInt:data.asBoolean()?1:0]; | ||
+ return @(data.asBoolean() ? 1 : 0); | ||
if (data.isDouble()) | ||
- return [NSNumber numberWithDouble:data.asDouble()]; | ||
+ return @(data.asDouble()); | ||
if (data.isArray()) | ||
return arrayFromVariantArray(data); | ||
if (data.isObject()) | ||
@@ -85,7 +85,7 @@ void AnnounceBridge(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, con | ||
{ | ||
if (!nonConstData["item"]["id"].isNull()) | ||
{ | ||
- item_id = (int)nonConstData["item"]["id"].asInteger(); | ||
+ item_id = static_cast<int>(nonConstData["item"]["id"].asInteger()); | ||
} | ||
|
||
if (!nonConstData["item"]["type"].isNull()) | ||
@@ -133,18 +133,18 @@ void AnnounceBridge(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, con | ||
if (!cachedThumb.empty()) | ||
{ | ||
std::string thumbRealPath = CSpecialProtocol::TranslatePath(cachedThumb); | ||
- [item setValue:[NSString stringWithUTF8String:thumbRealPath.c_str()] forKey:@"thumb"]; | ||
+ [item setValue:@(thumbRealPath.c_str()) forKey:@"thumb"]; | ||
} | ||
} | ||
double duration = g_application.GetTotalTime(); | ||
if (duration > 0) | ||
- [item setValue:[NSNumber numberWithDouble:duration] forKey:@"duration"]; | ||
- [item setValue:[NSNumber numberWithDouble:g_application.GetTime()] forKey:@"elapsed"]; | ||
+ [item setValue:@(duration) forKey:@"duration"]; | ||
+ [item setValue:@(g_application.GetTime()) forKey:@"elapsed"]; | ||
int current = CServiceBroker::GetPlaylistPlayer().GetCurrentSong(); | ||
if (current >= 0) | ||
{ | ||
- [item setValue:[NSNumber numberWithInt:current] forKey:@"current"]; | ||
- [item setValue:[NSNumber numberWithInt:CServiceBroker::GetPlaylistPlayer().GetPlaylist(CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist()).size()] forKey:@"total"]; | ||
+ [item setValue:@(current) forKey:@"current"]; | ||
+ [item setValue:@(CServiceBroker::GetPlaylistPlayer().GetPlaylist(CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist()).size()) forKey:@"total"]; | ||
} | ||
if (g_application.CurrentFileItem().HasMusicInfoTag()) | ||
{ | ||
@@ -154,7 +154,7 @@ void AnnounceBridge(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, con | ||
NSMutableArray *genreArray = [[NSMutableArray alloc] initWithCapacity:genre.size()]; | ||
for(std::vector<std::string>::const_iterator it = genre.begin(); it != genre.end(); ++it) | ||
{ | ||
- [genreArray addObject:[NSString stringWithUTF8String:it->c_str()]]; | ||
+ [genreArray addObject:@(it->c_str())]; | ||
} | ||
[item setValue:genreArray forKey:@"genre"]; | ||
} | ||
@@ -167,7 +167,7 @@ void AnnounceBridge(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, con | ||
NSDictionary *item = [dict valueForKey:@"item"]; | ||
NSDictionary *player = [dict valueForKey:@"player"]; | ||
[item setValue:[player valueForKey:@"speed"] forKey:@"speed"]; | ||
- [item setValue:[NSNumber numberWithDouble:g_application.GetTime()] forKey:@"elapsed"]; | ||
+ [item setValue:@(g_application.GetTime()) forKey:@"elapsed"]; | ||
//LOG(@"item: %@", item.description); | ||
[g_xbmcController performSelectorOnMainThread:@selector(OnSpeedChanged:) withObject:item waitUntilDone:NO]; | ||
if (msg == "OnPause") |
Oops, something went wrong.