Skip to content
This repository

[addons] change behaviour of system.platform.osx and add system.platform.darwin #970

Merged
merged 1 commit into from almost 2 years ago

5 participants

Memphiz Garrett Brown jmarshallnz davilla Tristan Fischer
Memphiz
Owner
Memphiz commented May 16, 2012

This changes the behaviour of the condition system.platform.osx.

Before it was true whenever it was one of ios or osx. Now its only true on osx anymore. For getting the old behaviour system.platform.darwin has to be used after this PR.

So basically we have:

system.platform.darwin - true on ios and osx
system.platform.osx - true on osx
system.platform.ios - true on ios

Hey we can delete a "TODO" comment from code - how cool :)

Memphiz [addons] - change system.platform.osx means osx only, system.platform…
….ios means ios only, system.platform.darwin means osx or ios
2594331
Garrett Brown
Collaborator
garbear commented May 16, 2012

deleting a TODO is possible? hm, you learn something new everyday

jmarshallnz
Owner

It would pay to comment about this in the skinning development forum - there's a thread there regarding frodo changes. We'll also need a bump for xbmc.gui.skin when this goes in (end of June window).

Memphiz
Owner
Memphiz commented May 16, 2012

done ... but it also is valid for other addons - not only skins. How to communicate that?

davilla
Collaborator
davilla commented May 16, 2012

at one time, there was a request to be able to tell an atv2/3 from a iphone/ipad.

that's why there was an system.platform.atv2

Memphiz
Owner
Memphiz commented May 16, 2012

yeah and its still there and it has to stay :)

so system.platform.ios will go true on ios and atv2
system.platform.atv2 will go true on atv2 only ...

but imho thats offtopic ;)

Memphiz
Owner
Memphiz commented May 28, 2012

Is there anything speaking against this change? Else i would like to queue this one up for the june milestone...

Tristan Fischer

Not sure that I got it right but I don't need to change something in the "XBMC Log Uploader" Addon, right?
https://github.com/dersphere/script.xbmc.debug.log/blob/master/addon.py#L117 L117-L126

Sorry, I have no OSX device to test with.

Memphiz
Owner
Memphiz commented May 29, 2012

Nope you are fine. Actually the script starts to put the logs in the right directory on ios with this PR. Before it used the osx path ;)

Memphiz Memphiz merged commit cb4aaaa into from June 01, 2012
Memphiz Memphiz closed this June 01, 2012
kibje kibje referenced this pull request in mazkolain/spotimc January 16, 2013
Open

Support for Apple TV 2 #56

Tobias Hieta tru referenced this pull request from a commit in plexinc/plex-home-theater-public January 10, 2014
Tobias Hieta Follow providers in search results.
Fixes #970
9bbc506
Memphiz Memphiz deleted the branch January 14, 2014
Dale Hamel dalehamel referenced this pull request from a commit in RasPlex/plex-home-theatre January 10, 2014
Tobias Hieta Follow providers in search results.
Fixes #970
038dd8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 16, 2012
Memphiz [addons] - change system.platform.osx means osx only, system.platform…
….ios means ios only, system.platform.darwin means osx or ios
2594331
This page is out of date. Refresh to see the latest.
5  xbmc/GUIInfoManager.cpp
@@ -1010,7 +1010,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
1010 1010
       CStdString platform = info[2].name;
1011 1011
       if (platform == "linux") return SYSTEM_PLATFORM_LINUX;
1012 1012
       else if (platform == "windows") return SYSTEM_PLATFORM_WINDOWS;
1013  
-      else if (platform == "osx")  return SYSTEM_PLATFORM_OSX;
  1013
+      else if (platform == "darwin")  return SYSTEM_PLATFORM_DARWIN;
1014 1014
       else if (platform == "osx")  return SYSTEM_PLATFORM_DARWIN_OSX;
1015 1015
       else if (platform == "ios")  return SYSTEM_PLATFORM_DARWIN_IOS;
1016 1016
       else if (platform == "atv2") return SYSTEM_PLATFORM_DARWIN_ATV2;
@@ -1891,8 +1891,7 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
1891 1891
 #else
1892 1892
     bReturn = false;
1893 1893
 #endif
1894  
-  else if (condition == SYSTEM_PLATFORM_OSX)
1895  
-  // TODO: rename SYSTEM_PLATFORM_OSX to SYSTEM_PLATFORM_DARWIN after eden release.
  1894
+  else if (condition == SYSTEM_PLATFORM_DARWIN)
1896 1895
 #ifdef TARGET_DARWIN
1897 1896
     bReturn = true;
1898 1897
 #else
2  xbmc/GUIInfoManager.h
@@ -386,7 +386,7 @@ namespace INFO
386 386
 #define SYSTEM_PLATFORM_XBOX        740
387 387
 #define SYSTEM_PLATFORM_LINUX       741
388 388
 #define SYSTEM_PLATFORM_WINDOWS     742
389  
-#define SYSTEM_PLATFORM_OSX         743
  389
+#define SYSTEM_PLATFORM_DARWIN      743
390 390
 #define SYSTEM_PLATFORM_DARWIN_OSX  744
391 391
 #define SYSTEM_PLATFORM_DARWIN_IOS  745
392 392
 #define SYSTEM_PLATFORM_DARWIN_ATV2 746
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.