XBMC Python Script (1 Viewer)

Johnmen

Portal Member
January 12, 2009
8
0
Home Country
New Zealand New Zealand
Excuse me for my dumb question, where can I find the SVN copy?
 

Johnmen

Portal Member
January 12, 2009
8
0
Home Country
New Zealand New Zealand
Thanks for the reply, looks like what needs to be done to get SVN working is a bit beyond my knowledge and ability, I will wait for a build. :)
 

dutchmatrix

Portal Member
August 21, 2007
15
0
58
Home Country
Netherlands Netherlands
No dll

This is a very interesting thread.
So i downloaded the svn and compiled it with (after migration) vs2008.
No errors and a very quick build.

But in the /bin/release i only have an .exe no .dll.
Did i miss anything during my build?

For now i can play with my .exe, thats more than i ever had with my xmbc

Tia
John

After i changed my output type to "Class library" it generated a .dll.
Was this the correct way?
 

dutchmatrix

Portal Member
August 21, 2007
15
0
58
Home Country
Netherlands Netherlands
Thanx for your Reply.

I compiled it as dll and it works.
Only a big problem with the timeshifting.
- First it wont stop timeshifting after i stop watching. (for this im gonna try the patch from redth)
- If i change channels, it wont play directly the new channel but plays the timeshift buffer which has the recording from the previous channel.
(This is a little annoying, but i have hope because it strongly relates to the first problem)

I also had a couple of times that the dll crashed, maybe if i add some more "try catch" i can tackle this.

But most important it's nice to play with the source.
 

toso06

New Member
February 8, 2009
2
0
Home Country
Sweden Sweden
Slightly modified version

Hello!

This is my first post in the MediaPortal forum and first I want to thank EvilDude for working on this plugin and script.

I had some problems with this early version so I modified it a bit. I always return false from "IsTimeshifting", I remove Swedish letters (åäö) from program names and I have modified the rtsp URL returned to the client (I think I had to do that because om my VM ware installation). Here are a zip file containing the result if someone want to try it (use reflector if you are interested in the source). Now I can watch live TV but XBMC crash after about 10 minutes due to this bug that was fixed 5 days ago. I need a new XBMC SVN build...

Thanks again EvilDude and keep up the good work!

/ Tomas
 

Attachments

  • TVServerXBMC.zip
    30.6 KB

swifty

Portal Pro
January 6, 2006
205
10
Home Country
United Kingdom United Kingdom
toso06: What is the purpose of always returning false from IsTimeshifting?
I haven't had time to look at the source of the script yet, but I'm encountering a problem after viewing TV via XBMC - If I stop the video the timeshift still runs (unless you back out to the main tv-server menu and use the context menu to stop timeshifting)
Does your change alter this behaviour in any way?

The problem is I use multiple clients, so normally if I'm downstairs I get no free tuners because the client upstairs is still timeshifting even though the video had been stopped..
 

toso06

New Member
February 8, 2009
2
0
Home Country
Sweden Sweden
Hello!

I don't know Python (only C#) so the script it hard for me to read but if IsTimeshifting returns true the server plugin won't get the TimeshiftChannel

command from the script.

If I always return false the client sends this sequence when I try to change the channel:
Handling command; IsTimeshifting
Handling command; TimeshiftChannel
PlayChannel result : rtsp://192.168.1.3/stream1.0

If I return true (when timeshifting has started) I get this when I try to change the channel:
Handling command; IsTimeshifting
Handling command; CloseConnection

My change to the rtsp URL was that I just return the server address:

// timeshift a channel and get the stream url
public static String playChannel(int chanId)
{
serverIntf.StopTimeShifting();
string rtspURL = "";

TvResult result = serverIntf.StartTimeShifting(chanId, ref rtspURL); // rtspURL contains a IP address for me

if (result != TvResult.Succeeded)
{
rtspURL = "[ERROR]:" + result.ToString();
}
else
{
// update globals
timeshiftUrl = rtspURL;
timeshiftChannel = chanId;

}

/ Tomas
 

jez

Portal Member
November 5, 2008
29
0
Melbourne
Home Country
toso06:
I haven't had time to look at the source of the script yet, but I'm encountering a problem after viewing TV via XBMC - If I stop the video the timeshift still runs (unless you back out to the main tv-server menu and use the context menu to stop timeshifting)

I think this is due to the way the timeshifting has to work. The plug-in doesn't know when you stop watching a video. This is why there's a "Stop Timeshifting" menu item, so you can do it manually.
 

Users who are viewing this thread

Top Bottom