# Set source + content + scraper (In one action)

• 0 Votes - 0 Average
• 1
• 2
• 3
• 4
• 5
 Donor Posts: 795 Joined: Mar 2012 Reputation: 23 2012-08-06 19:27 Post: #1 Hey guys, I'm looking to do the following: Onclick, open a "browse for source" to the user. (so not the add source dialog, but the browse function inside of it) The user browses for the folder. On clicking "ok" Set the folder as source (obviously) Set the content of the folder as the type that i specify in the xml. Set the scraper (if not automatically set to default) Set scan recursively Set movies are in separate folders (if type is movies..). So where can i find these commands? Or another way to do this? find
 Posting Freak Posts: 1,480 Joined: Jul 2010 Reputation: 55 Location: Germany 2012-08-06 19:48 Post: #2 Trigger a script with your onclick that uses JSON-RPC in order to modify the GUISettings - - - Tribute to Metallica - - - If I managed to help you, please click my reputation find
 Donor Posts: 795 Joined: Mar 2012 Reputation: 23 2012-08-07 07:14 Post: #3 Hey thanks for pointing me in the right direction. But this will be my first time trying to do that (or even looking at JSON). Are there any good examples of how to use that? Tutorials (with xbmc instead of http) / other skins / plugins that make use of this? find
 Team-XBMC Posts: 9,409 Joined: Jul 2011 Reputation: 143 Location: Dawn of time 2012-08-07 07:23 Post: #4 Don't think JSON-RPC allows that. Check the wiki for options Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules. For troubleshooting and bug reporting, make sure you read this first For your mediacenter artwork go to find
 Skilled Skinner Posts: 3,555 Joined: Mar 2010 Reputation: 69 Location: Switzerland 2012-08-07 08:02 Post: #5 (2012-08-07 07:14)MassIV Wrote:  Hey thanks for pointing me in the right direction. But this will be my first time trying to do that (or even looking at JSON). Are there any good examples of how to use that? Tutorials (with xbmc instead of http) / other skins / plugins that make use of this? http://forum.xbmc.org/showthread.php?tid=134129 find
 Donor Posts: 795 Joined: Mar 2012 Reputation: 23 2012-08-07 15:31 Post: #6 Trying to open browse dialog fails. XBMC\addons\skin.name\scripts\myScript.py Code: import os import xbmcgui import sys dialog = xbmcgui.Dialog() fn = dialog.browse(0, 'XBMC', 'files', '', False, False, 'C:\') Opened by: Code:      button_Category          RunScript(special://skin/scripts/myScript.py)  -edit- Then again my 'Hello world' also fails. Also tried XBMC.RunScript(C:\real\path\to\myScript.py) (This post was last modified: 2012-08-07 16:00 by MassIV.) find
 Skilled Skinner Posts: 2,282 Joined: Apr 2009 Reputation: 59 Location: Germany 2012-08-07 16:13 Post: #7 Are you adding tons of sources every day or why do you want to do it in one action? I may have a way but I don't think it makes much sense to add it to a skin. find
 Donor Posts: 795 Joined: Mar 2012 Reputation: 23 2012-08-07 16:39 Post: #8 Trying to make a skin dedicated to setting up XBMC. So if i want to change the order of the setup i kind of need to be able to set those commands separately. Going off a feature suggestion: http://forum.xbmc.org/showthread.php?tid=137501 find
 Skilled Skinner Posts: 2,282 Joined: Apr 2009 Reputation: 59 Location: Germany 2012-08-07 17:49 Post: #9 Ok, then I would wait if someone is willing to add the needed functionality to XBMC. You can only achieve it with dirty hacks at the moment. But I like the idea of a general wizard and I think this should be integrated natively. (This post was last modified: 2012-08-07 17:51 by `Black.) find
 Donor Posts: 795 Joined: Mar 2012 Reputation: 23 2012-08-07 18:11 Post: #10 I would still be interested in the dirty hacks. Just to get a proof of concept .zip for the skin up. find
• Search
• Help
• Create Account