XBMC Python Script (1 Viewer)

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Fantastic!

    I updated my XBMC SVN and it worked brilliantly.

    It did have two issues however:

    1. My channels didn't all show up on the xbox. When listed it only had 7, ABC and ABC2... for some reason SBS, Nine and Ten didn't show in the list. Even though they did in the console window when the request occurred.

    2. I think the server wasn't receiving a heart-beat, because after a few minutes watching 7 it suddenly fell back to the menu.

    But other than that I have to say I am exteremely impressed by the quick progress you've made so far.

    Thank you,
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    How odd with the channels not showing up.

    Re 1, was it not showing the groups or the channels inside the groups? I think there may be something wrong inside the groups as I noticed that I was missing some channels. I will look into it tomorrow.

    Re 2, I have not yet experienced this yet, but I will test it more. I am not sure how I would fix it, as I didn't notice any specific heart beat reply code - I thought the .net remoting might be taking care of it?

    Thanks for the feedback
    - Prashant
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Regarding 1 (Channels not listed):

    Say the channel list is:

    ABC1
    ABC2
    7 Digital
    etc ...

    It looks like this in XBMC:

    ABC1
    ABC2.3

    Notice that it seems to add an odd character on the end of the last channel... I think it's related to some sort of channel name enumerating... because in the console list it looks like this: (I'm going from memory, I've shut it all down for now)...

    1. ABC1
    2. ABC2
    3. 7 Digital

    I think the "3" I'm seeing in the XBMC channel list is the 3 from in front of the "7 Digital" in the console window ... if that makes sense?

    Regarding 2 (The dropping out)
    I'll try to recompile against a newer TV Server SVN and see if it has any effect, but it seemed like a heartbeat issue.

    Also,

    I really think you should consider making this a TV Server plugin. That way it will start and stop with the TV Server, but it will also have more direct access to the workings of the TV Server. This would improve the performance, I believe.

    Best of luck with the project, I'm impressed with the results so far and I'm excited to see where this goes.

    Cheers,
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    Thanks for that, I had a stupid bug in my python script which caused number 1 which I fixed in my version.

    I will look into the plugin tomorrow, and might port it over if it is easy :)
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    New version :)

    https://www.prashantv.com/xbmc/XBMCServer.zip

    The "TVServer Live TV" folder in the main folder is the latest python video plugin (only change is the channel fix)

    This is now a TVServer plugin. Works in the exact same way as before, except instead of connecting to the TVServer using RemoteControl, it uses the given IController.

    Can canyone give me hints on to how I would log stuff, as it still uses Console.WriteLine which isn't very useful?

    It still requires "Stop Timeshifting" to be used specifically, which I would like to eliminate. Now that I can hook into events, would it be possible to get an event such as New_StreamingClient or StreamingClient_Leave, so that I can go based on the event / the stream closed and stop the timeshift myself.
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Excellent,

    I'll give it a test after the Grand Prix :)

    As for the logging, you can use the tv.log by using:

    Code:
    using TvLibrary.Log;
    
    ...
    
    Log.Info("hello");
    Log.Debug("world");
    Log.Error("Crash!");
    
    etc. ...

    You should take a look at the MediaPortal Plugin SVN, there is plenty of examples of source code in there. And it would be good to put your source into the SVN as well. It provides a very good backup mechanism and it lets others enhanced, modify, bug fix, or just snoop in your code.

    If you set up a sourceforge account you can contact hwahrmann, rtv or james and they will give you write access to the plugin SVN.

    As I said, I'll test it after the GP and let you know how it goes ...

    Thank you again for your efforts, this is something I've wanted for so long ... if I wasn't so busy with other things I would probably have learned python and done it myself by now ... but such is life.

    Cheers,
     

    mrfil13

    Portal Member
    February 1, 2007
    5
    0
    44
    Just in the process of getting my media portal server setup, will have to give this a try when the backend is done. Going to have to dig out the xbox and a tv.

    Any screen shots of this yet?
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    Just tested it, streaming and timeshifting works fine!

    @EvilDude: Are you working on improvements, or are you happy with the current setup?

    Good to know :) Thanks. I am not actually sure what else to add at the moment, I would like to be able to see what is currently on etc perhaps with TV Server using some sort of guide data etc.

    I am open to suggestions :) If there's any good ideas, I will try to integrate it. The script, and the server especially, is very extensible. It is simply based on ListGroups, ListChannels, StartTimeshift, StopTimeshift as commands at the moment in the server, but is very easy to add more commands. The main problem is how to return more data to the client I guess. I am looking forward to XBMC's common front end to all PVR solutions, as then I can add this stuff as a backend for it, but that's a while away I'd think.
     

    Gamester17

    Portal Pro
    May 12, 2004
    98
    3
    Sweden
    Home Country
    Sweden Sweden
    Great work EvilDude!

    I for one is still curious how your script and work could be combined with thechad's python script for XBMC and MediaPortal plugin, (in order to get the best of both in one script so to speak), see =>
    MP & XBMC intergration scripts v0.6d Update 4-MAR-07 - MediaPortal Forum

    thechad's script with MP plugin features:
    - Play TV recordings from TV database
    - Schedule Manual Recordings.
    - Browse EPG.
    - Search EPG.
    - What's On Now?
    - What's On at Time (24 Hour format).
    - Text Search of Title and Description.
    - Schedule Recordings from EPG.
    - Edit recording schedules.
    - Start MediaPortal for scheduling of recordings.

    His scripts and MP plugin (including the C# source code) can be downloaded here:
    MediaPortal - XBMC plugin
     

    Users who are viewing this thread

    Top Bottom