• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 9
Virtual Python Folders
#31
Sorry for the wrong diff. This one should hopyfully work...
http://theendofthelongestline.de/virtual...lder2.diff
Reply
#32
Still compiling, but just a note.

Quote:
Here are some notes concerning the patch:
In video window, add a new path "python://<pathtoscript>", for example "python://e/apps/xbmc/scripts/test.py".

Is this your vision for the final version. Having to create a shortcut for each script?

I think a better alternative is to have three folders, maybe have them under a single folder. one for video, one for audio and one for picture.

So.

q:\\mediascripts <-main folder then
q:\\mediascripts\\video
q:\\mediascripts\\audio
q:\\mediascripts\\picture

then drop your scripts in the appropriate folder. the above paths should be added by default by XBMC.

This would allow easier installation.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#33
Well the drop and go functionality isnt there yet but this seems pretty solid for the core. I agree with having a special location although maybe the categories should be more open ended.

q:\plugins maybe? People might get confused between 'scripts' and 'mediascripts'.
Reply
#34
Thanks Unbehagen for your efforts.

Q:\plugins works fine for me, though perhaps in userdata might be a good idea? I think we also need some way to determine what type of media they serve, and a subfolder structure may well be the way to do that.

As for "drop and go" functionality, we can easily have the Add Source dialog select a python source directly.

One thing I'm a little concerned about is the "parent folder" stuff that is sometimes performed in XBMC - this takes a URL and tries to determine the parent URL. This ofcourse is tricky in this case unless the arguments parsed in are the folder structure. i.e. simply remove an argument to get to the parent dir.

Your thoughts on this would be welcome.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#35
Asteron to the naming rescue Smile

Edit: I'm not getting any result back from your test script. It initializes python, but a simple print statement doesn't even print.

Asteron did you get it working?

and yes i added import sys
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#36
Nuka1195 Wrote:I'm not getting any result back from your test script.

I found out why: you have to run it with a parameter ( ?foor=bar), otherwise the python script produces an error. Sorry about that
Reply
#37
Regarding drag'n'drop functionality: We can just add a handler that lists that directory if you call it with an empty script name (python:// url). Maybe we can just borrow the code from the scripts gui.
Reply
#38
That is the plan, yes.

Any thoughts on the parent folder determining? The simple way would be one argument per level. It's not a huge priority - most things work with it just fine, particularly if we URL encode the path to the script. At least then the usual "search for /" stuff will kick it back to the python:// URL. URL encoding the path to the script may be a pain in the arse to do from the scripts side of things though?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#39
I don't really understand that parent folder problem... If I press back on the remote, it jumps back one step in the "virtual" folder tree..I'm on IRC, maybe we can talk there if you have time.
Reply
#40
Unbehagen, that did it. I misunderstood what the source had to be.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#41
Nuka1195 Wrote:Unbehagen, that did it. I misunderstood what the source had to be.

No, the example script is just faulty so it crashes if you don't supply a parameter. Normally this shoudln't be needed.
Reply
#42
Ok,

Here is Apple movie trailers.

I set iconpath, but it didn't set the icon. I checked the path it should be correct. The genre list acts as folders.

Image
Image

It's alittle slow, but this was on the pc.

Edit: There may be already a way, but if the title "Videos" could be set somehow, depending what source your in that would be great. This is an XBMC thing, not a virtual python folder thing.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#43
Looks neat! I'm just porting the TVLinks script...
I'll look at the bug afterwards.
There are still some parsing issues I guess. The URL always has to have a question mark at the end it seems, even if no parameters are supplied..
Could you tell me how you do the windows build? Even with a debug bios, finding bugs sucks!
Reply
#44
it's in tools/win32. I think you can trace a release window build from VS2003
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#45
Just load up the XBMC_PC solution (tools/Win32) and build away.

Run the run_me_first.bat script (modified so that it mounts things in the correct location if necessary) and you're all good.

I'm on IRC now to discuss the parentpath thing - it's not a major issue, but is something that could turn around and bite us later.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 9

Logout Mark Read Team Forum Stats Members Help
Virtual Python Folders0