Set custom startup page in Eden
#1
Hello,

I have just upgraded to Eden. I managed to set up everything again (okay, only my remote settings lost, but it was fast to set it up again Smile) But i stuck at the last point. In Dharma, there was an option to start the system on the page where it was last left at. (For example in the folder of a movie/season of a serie). Is there any way to set it up in Eden also? Or alternatively, it would be fine also if the videos/file list menu (as stored on the hard drive) could be set up as the starting screen (instead of the simple Video menu root).
Is there any way to achieve any of these?

Thanks in advance.

(Edit: I am not sure if it matters... i am using the default Confluence skin [Sorry, if the question belongs to the Skin topic])
Reply
#2
There are several ways to make XBMC Start in Video/Files, though they all involve some minor messing around. What operating system are you using?

JR
Reply
#3
Hi,

Thanks for the answer. I am running xbmc on win xp pro, 32 bit version.
Reply
#4
The most robust way is to use an autoexec.py. This won't be affected by skin changes, upgrades etc.

Press Windows-R and in the Run dialog type:

Code:
notepad "%APPDATA%\XBMC\userdata\autoexec.py"

and click OK, and when you're prompted to create the file answer Yes. Copy and paste the following into Notepad:

Code:
import xbmc

xbmc.executebuiltin("ActivateWindow(Videos,Files)")

Close Notepad and save the changes. When XBMC starts it looks for an autoexec.py file, and if the file is there XBMC executes it. The code above opens Video/Files in a fairly obvious way.

This isn't perfect as you get the Home screen displayed for a moment before the script runs. To do better you would need to modify the skin.

JR
Reply
#5
Thanks! Works like a charm.
Reply
#6
Jhsrennie could you tell me how to do this for ubuntu? i want to start xbmc in Video>Files

Update: I think i figured it out. Correct me if I'm wrong but sudo gedit /home/user/.xbmc/userdata autoexec.py.
then paste code from above and save?
Reply
#7
Correct!

JR
Reply
#8
I had the same problen. I don't have XBMC open all the time and I want it to remember the folder where I was the next time I opened it.
So easy of a feature to implement, can't believe there is no option available to enable it. Anyways...

I took a stab at Pyton scripting and implemented this feature through the AUTOEXEC.PY that XBMC supports.
The script restores the original path when XBMC opens, and every 10 seconds will write the current location to a local file.
I could have had it that it writes the location only when XBMC gets closed, but I wanted to cover the case of PC crashing or going to sleep and never waking up, etc. If 10000 miliseconds is too often for you feel free to put 60000 (1 minute) or even more.

To use the script just create a autoexec.py running the following command in Windows:
Code:
notepad "%APPDATA%\XBMC\userdata\autoexec.py"

then paste into is the followinf code

Code:
import xbmc
import os

line = ""
logfile = "C:\\XBMC.LST"
lastpath = "Files"

print "AUTOEXEC: CHECKING FILE"
if os.path.isfile(logfile) == True:
    print "AUTOEXEC: RESTORING PATH"
    LF = open(logfile, 'r')
    for line in LF:
      print(line[:-1])
    LF.close()
      
if (line<>""):
    lastpath = line

print "AUTOEXEC: LAST PATH="+lastpath
xbmc.executebuiltin('ActivateWindow(Videos,"'+lastpath+'")')

count = 0
while (not xbmc.abortRequested):
    xbmc.sleep(10000)
    count = count + 1
    #print 'The count is:', count
    path = xbmc.getInfoLabel('Container.FolderPath')
    if (path<>"" ):
        lastpath = path
        LF = open(logfile, 'w')
        LF.write(lastpath)
        LF.close()
        
print "AUTOEXEC: FINISHED"
Reply

Logout Mark Read Team Forum Stats Members Help
Set custom startup page in Eden1