• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9
Virtual Python Folders
#46
I know it's early, but will we get a label2 and thumbnailImage?

Also this is more for JMarshall, can the list view for a folder set label2 to the number of items in the folder?

If Virtual python get's access to label2, I would set the genre list's label2 to the number of items and wondered if it would be ignored for a folder.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#47
Nope, it shouldn't be ignored I don't think - not 100% sure though.

I'll probably start a branch shortly with our progress to date.

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
#48
If you want a test script to play with
http://xbmc-scripting.googlecode.com/svn...Plugin.zip

It's just hacked together. It does require AMT to be installed with a minimium install if you don't need icons for any genre other than newest.

If you want to just play with it without icons here's a database
http://xbmc-scripting.googlecode.com/svn/old/AMT.zip
save it to Q:\UserData\script_data\Apple Movie Trailers\

here is an example source:
Code:
<source>
            <name>Apple Movie Trailers Plugin</name>
            <path>python://C/Finished_Builds/XBMC-2007.08.13-Rev9921/scripts/Apple Movie Trailers Plugin/default.py?root/</path>
        </source>
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#49
Here is another example:
http://www.theendofthelongestline.de/tvlinks.py.txt
You need some fixes though for it to work. Here are the pastebins:
http://pastebin.com/d7484df5a
http://pastebin.com/d9d148b7
Hope it works this way.
Reply
#50
Nuka1195: Doesn't seem to work here for me - it returns the genre list, but fails at the SQL queries at eval(trailer[3]) during the trailer fetch.

All: I've made some changes and created the branch. The SVN repo is here:

https://xbmc.svn.sourceforge.net/svnroot...es/plugins

The changes are mostly cosmetic. The only one that affects the scripting side of things is that the URL passed in as parameter 1 is complete (i.e. includes the plugin://<type>/<name>/default.py) so you don't have to prepend the protocol to directory URLs. This also gives us the possibility to change the folder structure around a bit without breaking scripts.

As you can see, the protocol is now plugin://<type of media>/<script name>/default.py

I've also added "Add Plugin..." to the "Add Source" dialog (via Browse). You should be able to add even subfolders of python stuff to there.

I'm sure there is bugs and issues to iron out - thus the branch Wink

Have a play and see what you think. Let me know what needs working on still, and if you want to work on something give us a shout so we know who's doing what.

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
#51
And for those that can't be bothered compiling yourself:

http://www.xboxmediacenter.com/upload/XB...lugins.rar

and a (very slightly) altered version of Nuka1195's AMT plugin:

http://www.xboxmediacenter.com/upload/Ap...Plugin.rar

Unrar the apple movie trailers.rar to <XBMC_dir>/plugins/video/ and away you go.

You can add plugins from the GUI via Browse for new source (thus the strings.xml).

Note that playback of the videos may not work (they don't here - some sort of FileCurl issue perhaps?)

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
#52
nice progress Smile unfortunately the pre-compiled version doesn't work. it only shows "Could not connect to network share". i will checkout the new branch later this day.

quick questions:
The video plugins for example only provide list.items in a virtual folder? what about the skinning part in scripts? is it usable (after editing) or will it be ignored?

regards
asciii
Reply
#53
It works fine - it's the executable that I run, after all.

Just Add Source -> Browse -> Add Plugin, and browse to wherever you have the plugin. Alternatively, just click Add Plugin then OK directly and it'll add the plugins folder as a source, so you can experiment with different ones.

EDIT: Note that with the AMT script, it'll only work at this point if you add source to the script itself, rather than a sub category. This is a minor issue that will be resolved.

And yes, currently plugins just provide the listitems, though what the script actually does is pretty much up to it - I'm not sure what will happen if you try invoking windows etc.

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
#54
ah. your right. without any database it wont work very well Smile

the new system is really nice for displaying a lot of items like tvlinks or other semi-static stream urls without a bunch of extra informations.
other scripts with less or other items like trailers or network tv stream links need additional information and i don't think it could be displayed as nice as in their old scripts.

what are your plans for showing up plots, thumbs, actor infos?

regards
asciii
Reply
#55
JMarshall, if that wasn't with a complete database, then that may be the reason. I didn't check for a NULL entry in the database. I'll fix it and modify the script to work with your new changes.

One nice thing about the add plugin.. way instead of the special drop in folder, is I can keep the plugin with the main script and keep it upto date version wise easier. Most scripts won't require this but AMT definately will require a main script to create the database, otherwise it could be painfully slow to start.

But, I can alway have the plugin call RunScript() and modify the path from that point on, so either way will work.

Edit: ignore most of the above I finished reading the thread. Will have a play.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#56
Here is a slightly modified version of JMarshalls slightly modified version.

And yes you need a database.

This has a check for NULL trailer urls so it shouldn't error, it does return all trailers even those without trailer urls, just for testing.
http://xbmc-scripting.googlecode.com/svn...Plugin.zip

The trailer url is now correct, but it doesn't play for me either it just freezes, I probably need to update to some of elupus newest changes though.

Edit: How about forcing the plugin to be named default.py as you do. then browse for folder instead of file. That way the folder name would be the default name. I'm sure that's the plan. Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#57
I have some further ideas: Right now we're having a 10 sec timeout with WaitForSingleObject(). Maybe we should change this and have something like a heartbeat: The script has to call a python function at least every three seconds so the c++ part knows that it didn't crash. Plugins that have to do tasks that take longer than the heartbeat interval can solve this by starting a heartbeat thread.
Any ideas on how we could implement a plugin configuration dialog / management? Or context menu stuff, like a "details" dialog? In my opinion those should somehow be able to integrate with whatever skin the user chooses. And with this, I don't mean WindowXML stuff, where you have to supply an XML for all well-know skins. I mean python functions that bind the plugin to display its information in a pre-defined dialog box with less possibilities.. What do you think?
What about another call back thing: A VirtualPythonFile? So plugins could have a fileItem with a url like python://<script...>?PlayFile=115. Then the plugin itself could manage to play the files.
I'd also like to have access to the PythonFolders via Filemanager. So I could browse AMT or TVL and if I want, copy the trailers, videos, etc. to my HDD. Would that be hard to implement? Sure, this wouldn't be possible with the PythonFiles, but on those special files it could just display an error message.
Reply
#58
I would like to work on a python method that adds a plugin via a script. My thought was for AMT you need the full script to create the database and cache, so. In settings I would add a button "Install plugin" This would create the AMT folder in plugins/video done via python. The add a source to sources.xml, this would be done by the python method. This also could be done via python, but how would it update without restarting and seems safer from XBMC.

Unbehagen, I suggested a progress dialog controlled by XBMC that had a hook the script could call (maybe the same as your heartbeat). It could only activate after a few seconds, like Programs does when creating the database. Not the busy dialog.

About copying files or downloading them, I thought I would if mode was download, just set the url to the script again, with a download parameter instead of the url to the movie. Then you can go ahead and play the trailer when it finished from python. I don't think it would interfere with anything. If the file was already downloaded which I save in the database I would pass the local path, the script would just check for the file first.

The plugin configuration and context menu. I think two additional methods setPluginButtons(), setContextMenu(). This way you can call them anytime if parameters change. You would set a button or context menu item to run your default.py or another .py file with the appropriate args.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#59
Could anyone tell me why this plugin works (slowly) in the browse plugins screen, but not if I access it afterwards?
http://max-server.informatik.uni-bremen....m/joox.rar
Reply
#60
Strange. I didn't change anything and now it works. Heisenbug?
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9

Logout Mark Read Team Forum Stats Members Help
Virtual Python Folders0