![]() |
|
|||||||
| Plugin/Script (Python) Development Developers forum for XBMC Python Plugins/Scripts. Scripters/coders only! Not for posting feature requests, bugs, or end-user support requests! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 | |
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
i recently setup mythtv and am waiting for my pvr-250 tv tuner card to arrive. while i wait, i have setup the xbox version of mythtv that runs linux but was a bit disappointed. it takes a long time to boot up and a lot of the features are already handled by xbmc (e.g. weather, games, music, videos, dvd). the only additional feature that i currently want to use is the ability to view recorded tv shows, program recordings, delete recordings, look at tv schedule. as a result, i started playing with the python interpreter in xbmc.
after writing some scripts, i have a few questions. i'm new to python (just learned it on the weekend) so if the language supports something natively, i might not have discovered this yet so go easy on me. 1. does the xbmc version of python provide hooks to access smb shares natively? i found a pure python implementation of the smb client side protocol and have been able to get that working nicely but i was just wondering if there already exists a way to do this? i know that xbmc.player() can access files over smb shares if the "url" is constructed properly but i haven't found a way to do this using, for example, nt.listdir(dir). 2. xbmc obviously parses xml. is this exposed anywhere in the python interpreter? in order to bootstrap to the mysql database, i need a place to store the hostname, database name, user, and password. i was thinking of adding this to my xboxmediacenter.xml file. if there was a way for python scripts to get access to the parsed config file or to call the xml parser on a file, that would be handy. 3. does anyone know of a pure python mysql client interface module? in order to learn python, i wrote a python module that supports connecting and authenticating to mysql over a socket, select, insert, update, and deleting of rows in the database, creating and dropping databases. it does what i need it to do and i'm willing to contribute this to the project... but i'd like to add some more documentation to it and use it in a useful script so that i can make sure i'm happy with the api. if there already exists such a beast, then there's no point in me working any further on it. 4. i ran into a weird problem with the following code: Quote:
5. someone mentioned in the forum about having buttons bound to python scripts... it would be fantastic if a user could add a button to the main xbmc menu (e.g. mythtv) that launches a python script. at the moment, the only way i could launch my scripts is to go into the settings ->scripts screen and pick the name of my script. i tried creating a shortcut to the python script so that i could pick the shortcut under programs but this did not work. i tried placing my python script in an apps folder but it didn't work either. is there any other way to launch a python script other than through the settings screen? keep up the great work on the python interface! the possibilities are endless... |
|
|
|
|
|
|
#2 | ||||||
|
Team-XBMC Developer
Join Date: Sep 2003
Posts: 530
![]() |
Quote:
Quote:
if you read some documentation on www.python.org you will see that there is support for xml files. Quote:
and if you want to share what you already have, please. i think a lot of other user find this usefull. Quote:
Quote:
Quote:
__________________
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.
|
||||||
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2004
Posts: 27
![]() |
i've been thinking about this for some time. recently i suggested adding mythtv frontend support as a feature, but maybe it will be possible to implement at least the main features through python.
i assume you already might know this, or maybe there's even better documentation, but i'll link it anyway. as soon as you have some working code i'll beta test it for you and i'll try to help to improve it
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
thanks darkie for the quick reply and the info.
stickman thanks for the info. at the moment, i'm focusing on getting access to the mythtv information in the database without using the mythtv protocol. the main driver for this is so that i can watch recorded shows without firing up the full blown linux mythtv frontend on the xbox. also, i'd like to be able to view tv listings on the xbox and since mythtv has it all in the database already, i might as well grab it from there instead of hitting zap2it again. eventually, i'd like to get scheduling, etc. working... so at some point i'll have to delve into the protocol. anyway, for those interested, here is a tar file containing the mysql python module that i wrote... it also includes the pysmb modules for accessing smb/cifs remote file systems. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2004
Posts: 174
![]() |
as i said in another topic, i managed to read the listing.xml created by xmltv but there's a bug in thecurrent version of¨xbox python that prevents it to work. but darkie said he will fixes this soon.
|
|
|
|
|
|
#6 | |
|
Fan
Join Date: Sep 2003
Posts: 1,972
![]() |
Quote:
cvs-note: 24-03-04 added: pyexpat module to python, should fix all those (pyhon) xml problems
__________________
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support! read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables! |
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2004
Posts: 20
![]() |
i think this is great idea. thank you for doing this.
i can help test the scripts for you but i only have the xbmc build from 3/9/2004. |
|
|
|
|
|
#8 | |
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
Quote:
oh well... patience.
|
|
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Mar 2004
Posts: 20
![]() |
Quote:
excellent work! it was able to query the mysql db and get a list of recorded tv programs and access the tv program share when i selected a program. but a couple issues: 1. when you select a program, it starts playing (you can hear the audio) but it does not display the video. you have to press x or display to see the video playing. 2. when i press stop or reach the end of the video, the whole thing freezes and the screen goes black. i can't get back to xbmc or play the tv program anymore. |
|
|
|
|
|
|
#10 | ||
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
Quote:
Quote:
|
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MythTV front-end client built-into to XBMC | falser | XBMC Feature Suggestions | 667 | 2009-10-20 02:05 |
| Xbmc as a mythtv front end | thayne | XBMC General Discussion | 2 | 2005-01-26 13:55 |
| Xbmc as a mythtv front end | thayne | Plugin/Script (Python) Help and Support | 2 | 2005-01-26 13:55 |
| Mythtv | ppcblaster | XBMC for Xbox Specific Support | 2 | 2004-12-29 00:06 |
| www.mythtv.org | phiberz | XBMC Feature Suggestions | 5 | 1970-01-01 02:00 |