2011-09-07, 10:31
One option is to create an autoexec.py file. This is a script that XBMC executes whenever it starts, so if you put code to export the database in this file it will export the database every time XBMC starts.
Assuming you're using Windows, press Windows-R and in the Run dialog type:
notepad "%appdata%\xbmc\userdata\autoexec.py"
and click OK. If you're asked to create a new file answer Yes. When Notepad opens copy and paste the following:
Close Notepad and save the changes. Now start XBMC and you should see the export run. I've tested this on my PC and it works, though if the export takes more than a few seconds it's a bit intrusive. It would annoy me.
Another option is to run the script manually, though I'd guess from the context this isn't appropriate. Alternatively you could create a batch file that you run from the Task Scheduler. However note that XBMC has to be running when the scheduled task runs because the scheduled task can't export the library directly. It has to ask XBMC to do the export. Note also that when the scheduled task runs the user will see the "Export in progress" message appear while XBMC does the export.
JR
Assuming you're using Windows, press Windows-R and in the Run dialog type:
notepad "%appdata%\xbmc\userdata\autoexec.py"
and click OK. If you're asked to create a new file answer Yes. When Notepad opens copy and paste the following:
Code:
import xbmc
xbmc.executebuiltin('exportlibrary(video,true,true,true,true)')
Close Notepad and save the changes. Now start XBMC and you should see the export run. I've tested this on my PC and it works, though if the export takes more than a few seconds it's a bit intrusive. It would annoy me.
Another option is to run the script manually, though I'd guess from the context this isn't appropriate. Alternatively you could create a batch file that you run from the Task Scheduler. However note that XBMC has to be running when the scheduled task runs because the scheduled task can't export the library directly. It has to ask XBMC to do the export. Note also that when the scheduled task runs the user will see the "Export in progress" message appear while XBMC does the export.
JR