XBMC Python Script (1 Viewer)

EvilDude

Portal Member
February 1, 2008
43
3
Home Country
I am a XBMC user who would love to get live tv streaming on the xbox.

I am interested in writing a python script (all I want is a way to play live tv, for now at least).

Is anyone interested in helping, and can anyone lead me to where I would find how to communicate with TV server.

Thanks for any help.
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
Yeah! That would be really nice! Setting up MythTV backend and make it possible to connect to it from my XBOX is pretty nasty. Setting up the MP TV server is much easier.
 

EvilDude

Portal Member
February 1, 2008
43
3
Home Country
Edit: fixed my problem.

Thanks charli, I will take a look at those documents.

Yeah! That would be really nice! Setting up MythTV backend and make it possible to connect to it from my XBOX is pretty nasty. Setting up the MP TV server is much easier.

Yeah, my card doesnt work in linux :( I cycled through a ton of programs. I tried out TV server about a month ago, it didn't work properly, and after a lot of cycling, I decided to try again and the latest SVN version works great! So I decided it will be my server and since XBMC is my client everywhere in the house, might as well write a nice way to use it.
 

charli181

Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    please let us all know how you go as I believe MediaPortal was birthed from XBMC. It would be great to add some info on how to port to the old Xbox if possible.

    I am a Play Station 1/2 boy myself but if you can TV running, I am sure you will be crowned the next Billy G. :p
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    Hm, I looked through the documentation and the source, but I'm a little confused as to how exactly a client talks to the server. Does it have any specific ports / use a specific protocol, or does it use .net to call the remote functions? If it is the latter, the python script will have to emulate the .net protocol I guess. I was expecting some sort of specific protocol over tcpip.
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    I think you'd be better off writing a program or plugin for the TV Server that acts as a go-between.

    Maybe take a look at the TV Client program, perhaps you could add a simple communications method between it and XBMC.

    If I knew anything about coding for XBMC or indeed anything about Python I would try to help you out. But I'm afraid I don't.

    However, if there is anything I can do MediaPortal plugin or windows app wise then please let me know. I have two XBMC Xbox's in my house and would love to use them for live digital TV viewing.

    Just simple tv viewing would be an awesome first step. Also, there is another ongoing project with the same lofty aims. It's been progressing extremely slowly, so perhaps you can give it the injection of developer time that it needs.

    Best of luck and please do keep us informed of your progress...

    Cheers,
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    and-81: Thanks for that idea! I don't know why I was trying to write it all in python.

    I am working on a middleman currently. I am currently able to telnet connect to it, issue the commands and get a list of groups easily, so the script should be simple to write. I am using a fair bit of code from the MP TV Client. I am using the same ServerInterface.cs and Utils.cs, and just learning how to use the server from frmMain. Once I have some it working at all, I will put the code up somewhere, should probably be made into a plugin or something though. Not too worried about that right now though.

    Anyway, just a small problem I was thinking about:
    The way I am going to write the python script is that, it will ask for a list of groups, then ask for channels in that group, and when the channel is selected, it will tell my server what channel, my server will start timeshifting and return the URL / or an error. Now that will work fine - but the problem is that once the python script gets the URL, XBMC will play it external to the script, so my script will not know when the user has stopped watching the video. The script has no real way to tell my server to disconnect from the tv server, or to stop the timeshifting.

    Is there anyway of telling the server to stop timeshifting as soon as the last client disconnects or something - or is there anything else you would recommend?
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Is there anyway of telling the server to stop timeshifting as soon as the last client disconnects or something - or is there anything else you would recommend?

    The tvservice has an "heart beat" feature that will disconnect inactive clients automatically.
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    EvilDude:
    I was thinking about a telnet interface as TvServer Plugin from time to time but never found time to begin work.
    I very much appreciate your work and am looking forward to see your results :)
    Just let me know if you need help ;)
     

    Users who are viewing this thread

    Top Bottom