Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[settings] - version 2.0.3 - adds settings for disabling the inital l…

…ight flash and the toast dialogs
  • Loading branch information...
commit 5ecaefcfb45f8f4517e9611f70b0d0010cdb2753 1 parent 0dbb412
@Memphiz Memphiz authored
View
2  script.xbmc.boblight/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.xbmc.boblight" name="XBMC Boblight" version="2.0.2" provider-name="bobo1on1, Memphiz">
+<addon id="script.xbmc.boblight" name="XBMC Boblight" version="2.0.3" provider-name="bobo1on1, Memphiz">
<requires>
<import addon="xbmc.python" version="2.1"/>
</requires>
View
4 script.xbmc.boblight/changelog.txt
@@ -1,3 +1,7 @@
+2.0.3
+- [add] - option for disabling/enabling the initial color blink
+- [add] - option for disabling/enabling any user notifications (connection lost and so on)
+
2.0.2
- [fix] activate static light when playing audio
View
9 script.xbmc.boblight/default.py 100755 → 100644
@@ -95,14 +95,15 @@ def connectBoblight(self, force_warning):
if not ret:
log("connection to boblightd failed: %s" % bob.bob_geterror())
text = __language__(500)
- if self.warning < 3:
+ if self.warning < 3 and settings.other_misc_notifications:
xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
self.warning += 1
return False
else:
self.warning = 0
- text = __language__(501)
- xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
+ if settings.other_misc_notifications:
+ text = __language__(501)
+ xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
log("connected to boblightd")
bob.bob_set_priority(128)
return True
@@ -123,7 +124,7 @@ def startup(self):
t1 = __language__(504) # lib for osx, ios and windows
t2 = __language__(509)
if xbmcgui.Dialog().yesno(__scriptname__,t1,t2):
- tools_downloadLibBoblight(platform)
+ tools_downloadLibBoblight(platform,settings.other_misc_notifications)
loaded = bob.bob_loadLibBoblight(libpath,platform)
View
2  script.xbmc.boblight/resources/language/English/strings.xml
@@ -41,6 +41,8 @@
<string id="403">Green</string>
<string id="404">Blue</string>
<string id="405">Disable when Screen Saver is on</string>
+ <string id="406">Enable initial light flash</string>
+ <string id="407">Enable status notifications</string>
<!--Notifications-->
<string id="500">Failed to connect to boblightd!</string>
View
2  script.xbmc.boblight/resources/language/German/strings.xml
@@ -41,6 +41,8 @@
<string id="403">Gruen</string>
<string id="404">Blau</string>
<string id="405">Waehrend Bildschirmschoner Licht ausschalten</string>
+ <string id="406">Initialen Lichttest aktivieren</string>
+ <string id="407">Statusnachrichten aktivieren</string>
<!--Notifications-->
<string id="500">Fehler beim Verbinden zu boblightd!</string>
View
12 script.xbmc.boblight/resources/lib/settings.py
@@ -79,6 +79,8 @@ def start(self):
self.other_static_green = int(float(__addon__.getSetting("other_static_green")))
self.other_static_blue = int(float(__addon__.getSetting("other_static_blue")))
self.other_static_onscreensaver = __addon__.getSetting("other_static_onscreensaver") == "true"
+ self.other_misc_initialflash = __addon__.getSetting("other_misc_initialflash") == "true"
+ self.other_misc_notifications = __addon__.getSetting("other_misc_notifications") == "true"
# Movie settings
self.movie_saturation = float(__addon__.getSetting("movie_saturation"))
@@ -239,10 +241,14 @@ def bob_init(self):
self.handleGlobalSettings()
bob.bob_set_priority(128) # allow lights to be turned on, we will switch them off
# in 'handleStaticBgSettings()' if they are not needed
- for i in range(len(BLING)):
- rgb = (c_int * 3)(BLING[i][0],BLING[i][1],BLING[i][2])
+ if self.other_misc_initialflash:
+ for i in range(len(BLING)):
+ rgb = (c_int * 3)(BLING[i][0],BLING[i][1],BLING[i][2])
+ bob.bob_set_static_color(byref(rgb))
+ xbmc.sleep(1000)
+ else:
+ rgb = (c_int * 3)(0,0,0)
bob.bob_set_static_color(byref(rgb))
- xbmc.sleep(1000)
self.run_init = False
xbmc.sleep(500)
return True
View
7 script.xbmc.boblight/resources/lib/tools.py
@@ -48,7 +48,7 @@ def _pbhook(numblocks, blocksize, filesize, url=None,dp=None):
log("boblight: DOWNLOAD CANCELLED") # need to get this part working
dp.close()
-def tools_downloadLibBoblight(platform):
+def tools_downloadLibBoblight(platform,allowNotify):
log("boblight: try to fetch libboblight")
libname = get_libname(platform)
destdir = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib') )
@@ -60,8 +60,9 @@ def tools_downloadLibBoblight(platform):
xbmc.executebuiltin('XBMC.Extract("%s.zip","%s")' % (dest, destdir), True)
os.remove(dest + ".zip")
except:
- text = __language__(510)
- xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
+ if allowNotify:
+ text = __language__(510)
+ xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
def log(msg):
xbmc.log("### [%s] - %s" % (__scriptname__,msg,),level=xbmc.LOGDEBUG )
View
3  script.xbmc.boblight/resources/settings.xml
@@ -41,5 +41,8 @@
<setting id="other_static_green" type="slider" subsetting="true" enable="eq(-2,true)" label="403" option="int" default="128" range="0,255" />
<setting id="other_static_blue" type="slider" subsetting="true" enable="eq(-3,true)" label="404" option="int" default="128" range="0,255" />
<setting id="other_static_onscreensaver" type="bool" label="405" default="false" />
+ <setting id="sep3" type="sep" />
+ <setting id="other_misc_initialflash" type="bool" label="406" default="true" />
+ <setting id="other_misc_notifications" type="bool" label="407" default="true" />
</category>
</settings>

0 comments on commit 5ecaefc

Please sign in to comment.
Something went wrong with that request. Please try again.