[27b768]: service.rom.collection.browser / default.py  Maximize  Restore  History

Download this file

52 lines (42 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright (C) 2011 Malte Loepmann (maloep@googlemail.com)
#
# This program 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.
#
# This program 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, see <http://www.gnu.org/licenses/>.
import os
import xbmcaddon
def checkStartupAction():
#get access to RCB
rcbAddon = None
try:
rcbAddon = xbmcaddon.Addon(id='script.games.rom.collection.browser')
except:
print 'RCB Service: Error while accessing "script.games.rom.collection.browser". Make sure the addon is installed.'
return
launchOnStartup = rcbAddon.getSetting('rcb_launchOnStartup')
print 'RCB Service: launch RCB on startup = ' +str(launchOnStartup)
if(launchOnStartup.lower() == 'true'):
#make sure that we don't launch it again
rcbAddon.setSetting('rcb_launchOnStartup', 'false')
path = os.path.join(rcbAddon.getAddonInfo('path'), 'default.py')
print 'RCB Service: launch RCB ' +str(path)
xbmc.executescript("%s" %path)
return
#check scrape on XBMC startup setting
scrapeOnStart = rcbAddon.getSetting('rcb_scrapOnStartUP')
print 'RCB Service: scrape games on startup = ' +str(scrapeOnStart)
if(scrapeOnStart.lower() == 'true'):
#launch dbUpdate
path = os.path.join(rcbAddon.getAddonInfo('path'), 'dbUpLauncher.py')
print 'RCB Service: Starting DB Update' +str(path)
xbmc.executescript("%s" %path)
print 'RCB Service: Start'
checkStartupAction()
print 'RCB Service: Done'

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks