Skip to content

Commit

Permalink
Introduce separate service script for auto launch feature.
Browse files Browse the repository at this point in the history
Migrate addon.xml to frodo conventions.
  • Loading branch information
durchflieger committed Feb 10, 2013
1 parent 8c3321a commit 3a3ba44
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
6 changes: 3 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<addon
id="script.dfatmo"
name="DFAtmo"
version="0.3.1"
version="0.3.2"
provider-name="durchflieger"
>
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="xbmc.python" version="2.0.0"/>
</requires>
<extension point="xbmc.python.script" library="dfatmo.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.service" library="dfatmo.py" start="login"></extension>
<extension point="xbmc.service" library="service.py" start="login"></extension>
<extension point="xbmc.addon.metadata">
<summary>DFAtmo the driver for 'Atmolight' controllers for VDR, XBMC and xinelib based video players.</summary>
<description>The DFAtmo XBMC addon analyzes the video picture and generates output data for 'Atmolight' controllers.</description>
Expand Down
7 changes: 0 additions & 7 deletions dfatmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ def displayNotificationAndLog(level, msg):
displayNotification(level, msg)


if ( __name__ == "__main__" ):
if xbmcgui.getCurrentWindowId() == 10000:
if addon.getSetting('enabled') != 'true':
log(LOG_INFO, "Automatic launch of addon not enabled")
sys.exit(0)


try:
if xbmc.CAPTURE_STATE_DONE:
pass
Expand Down
28 changes: 28 additions & 0 deletions service.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# ---
# Copyright (C) 2011,2012 Andreas Auras <yak54@inkennet.de>
#
# This file is part of DFAtmo the driver for 'Atmolight' controllers for XBMC and xinelib based video players.
#
# DFAtmo is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DFAtmo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
#
# This is the DFAtmo XBMC service addon.
#
# ---

if ( __name__ == "__main__" ):
import xbmc, xbmcaddon
addon = xbmcaddon.Addon(id='script.dfatmo')
if addon.getSetting('enabled') == 'true':
xbmc.executebuiltin('RunAddon("script.dfatmo")')

0 comments on commit 3a3ba44

Please sign in to comment.