[CLOSED] Open network folder on startup
#1
I would like XBMC to open a network folder (Video files) on startup.

I've followed instructions from this thread, but I can't make it work.


Please find below the content of my autoexec.py

import xbmc

xbmc.executebuiltin("ActivateWindow(10025,"smb://PC/Films/")")


What do I do wrong?

Many thanks!
Reply
#2
Why do you want this in the first place? Maybe there is a better solution...
"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
Reply
#3
I mainly use XBMC for playing video files in this network folder and I don't want to use Library mode for these files.
Reply
#4
If you followed the instructions I posted in that thread you referenced in your first post above, then you should have created a Favourite for that video file source in order to get the needed info to create your autoexec.py. If so, does your networked video folder open when you select that Favourite?
Reply
#5
Yes network folder opens when I click on the Favourite.

Please find content of my favourites.xml below.

<favourites>
<favourite name="Films">ActivateWindow(10025,&quot;smb://PC/Films/&quot;)</favourite>
</favourites>

I should include the &quot; as well?
Reply
#6
(2012-10-24, 14:01)AussieFries Wrote: I should include the &quot; as well?

Yes. Use the following in your script:
Code:
xbmc.executebuiltin("ActivateWindow(10025,&quot;smb://PC/Films/&quot;)")
Reply
#7
I tried the above code but when I run it XBMC shows a blank 'window' and a mouse cursor (mouse is not even plugged in!)

Debug log is showing the below errors:

13:03:33 T:2768 DEBUG: XBPyThread::Process - The source file to load is C:\Users\xbmc\AppData\Roaming\XBMC\userdata\autoexec.py
13:03:34 T:836 DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.common.plugin.cache;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.xbmcswift\lib;C:\Program Files (x86)\XBMC\addons\script.module.simplejson\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.common.plugin.cache\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.simple.downloader\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.parsedom\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Program Files (x86)\XBMC\addons\script.module.pysqlite\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python26.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages;
13:03:34 T:836 DEBUG: XBPyThread::Process - Entering source directory C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.common.plugin.cache
13:03:34 T:2768 DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\xbmc\AppData\Roaming\XBMC\userdata;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.xbmcswift\lib;C:\Program Files (x86)\XBMC\addons\script.module.simplejson\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.common.plugin.cache\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.simple.downloader\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.parsedom\lib;C:\Users\xbmc\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Program Files (x86)\XBMC\addons\script.module.pysqlite\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python26.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages;
13:03:34 T:2768 DEBUG: XBPyThread::Process - Entering source directory C:\Users\xbmc\AppData\Roaming\XBMC\userdata
13:03:34 T:836 DEBUG: Instantiating addon using automatically obtained id of "script.common.plugin.cache" dependent on version 2.0 of the xbmc.python api
13:03:34 T:836 NOTICE: StorageServer Module loaded RUN
13:03:34 T:836 NOTICE: StorageClient-1.3.0 Starting server
13:03:34 T:2768 INFO: Scriptresult: Success
13:03:34 T:836 NOTICE: StorageServer-1.3.0 Storage Server starting C:\Users\xbmc\AppData\Roaming\XBMC\userdata\Database\commoncache.db
13:03:34 T:2768 INFO: Python script stopped
13:03:34 T:2768 DEBUG: Thread XBPyThread 2768 terminating
13:03:34 T:2504 DEBUG: waiting for python thread 4 to stop
13:03:34 T:2504 DEBUG: python thread 4 destructed
13:03:34 T:2504 DEBUG: Activating window ID: 10025
13:03:34 T:2504 DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
13:03:34 T:2504 DEBUG: ------ Window Init (MyVideoNav.xml) ------
13:03:34 T:2504 INFO: Loading skin file: MyVideoNav.xml
13:03:34 T:2504 DEBUG: CGUIMediaWindow::GetDirectory (&quot;smb://PC/Films/&quot;)
13:03:34 T:2504 DEBUG: ParentPath = [&quot;smb://PC/Films/&quot;/]
13:03:34 T:2504 WARNING: XFILE::CFactoryDirectory::Create - Unsupported protocol(&quot;smb) in &quot;smb://PC/Films/&quot;
13:03:34 T:2504 ERROR: CGUIMediaWindow::GetDirectory(&quot;smb://PC/Films/&quot;) failed
13:03:38 T:2504 DEBUG: ------ Window Deinit (Pointer.xml) ------
13:04:02 T:2504 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib.dll)
13:04:03 T:268 DEBUG: Thread Jobworker 268 terminating (autodelete)
Reply
#8
remove the "&quot;", so it should read:
Code:
xbmc.executebuiltin("ActivateWindow(10025,smb://PC/Films/)")

I just tested this with Frodo nightlies and this worked.
Reply
#9
It works for me as well!

Thank you so much!
Reply
#10
You are welcome.
Reply
#11
An easier and eleganter way is to edit the Confluence home.xml file.

Under below section in home.xml :

Code:
<window>
    <defaultcontrol always="true">9000</defaultcontrol>
    <allowoverlay>no</allowoverlay>

Place following line:

<onload condition="Window.Previous(startup)">ActivateWindow(Video,Files,return)</onload>
Reply

Logout Mark Read Team Forum Stats Members Help
[CLOSED] Open network folder on startup0