SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 12-04-2008, 02:27 AM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Ahh good. This is a XBMC script not a plugin as the title suggests, so it needs to be run as a script. The biggest trick is to make sure your paths are setup correctly in the settings file.
Reply With Quote
  #22  
Old 12-04-2008, 07:36 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Ok... here's another plug for using the Sage Remote APIs...

This script looks pretty cool. I'm a long time XMBC fan, but I've recently had to let it go, since it does not support mpeg4 HD (at least not on the xbox).

The remote apis give you complete access to sagetv using http requests and xml/json replies (don't know if python can consume json natively or not, but xml for sure).

This means whatever you can do in an STV, you can now pretty much do using the remote apis.

Also, the project, provides a mechanism for genereating code. currently there are generated client libraries for Java and JSP tag clients. I'm also looking at creating a javascript client. Creating a python client that wraps the http calls would be fairly easy as well.

Just something to consider as you move forward.
Reply With Quote
  #23  
Old 12-04-2008, 09:12 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Very cool info. I will add this to my lits to check into. Maybe this could be used to make a plugin instead of a script since the current scraping seems too slow for the plugin. Either way I will check it out. I almost have a grid based EPG added into the script, but its just too slow parsing the XML as there are so many entries. I will see about this Sage Remote APIs and itf it may help out.

Last edited by mikwilli; 12-04-2008 at 09:37 AM. Reason: more info
Reply With Quote
  #24  
Old 12-04-2008, 10:02 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
if you need help understanding how the api works, let me know. I've put a buch of information in the wiki, so hopefully that will help.

As for the responses comming back, the xml is small, since is mainly is only sending back string values and "references". It means more http calls, but in my testing, it's really fast to make those calls.

If python supported the json syntax (ie, could evaluate it on the fly), then that would be even faster. Or if you can evaluate python on the fly from a url response, then you could create a pyon (python object notation) handler in the sage api to return back sage responses in python (much like json does for javascript).
Reply With Quote
  #25  
Old 12-04-2008, 10:06 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
The JSON site has a list of parsers available for a lot of different languages, including Python.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #26  
Old 12-04-2008, 10:11 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Thanks guys I have been able to get this up and running and I am very excited about the possibilities for this. I think more small http calls should greatly speed things up as it is the P3 processing power that is more limiting with the Xbox. Slogging through even the XML just eats up a lot of processor time. I am checking through the API and will let everyone know when I get the scripts converted over. Thanks again for pointing this out. I did see your post when I was trolling, but to be honest I was too lazy to look into it. Good incentive for me not to be lazy in the future as this would have helped out lots before now.
Reply With Quote
  #27  
Old 12-04-2008, 10:14 AM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by stuckless View Post
Ok... here's another plug for using the [URL="http://forums.sagetv.com/forums/downloads.php?do=file&id=255"]...I'm a long time XMBC fan, but I've recently had to let it go, since it does not support mpeg4 HD (at least not on the xbox)...
Not totaly true. If properly encoded the Xbox can playback mpeg4HD content. There is a thread dedicated to that, at least there was. Have you tried XBMC for Linux/Mac/Win32 yet?

This new API sounds damn exciting!
Reply With Quote
  #28  
Old 12-04-2008, 10:15 AM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by mikwilli View Post
Thanks guys I have been able to get this up and running and I am very excited about the possibilities for this. I think more small http calls should greatly speed things up as it is the P3 processing power that is more limiting with the Xbox. Slogging through even the XML just eats up a lot of processor time. I am checking through the API and will let everyone know when I get the scripts converted over. Thanks again for pointing this out. I did see your post when I was trolling, but to be honest I was too lazy to look into it. Good incentive for me not to be lazy in the future as this would have helped out lots before now.
If you need a tester, let me know
Reply With Quote
  #29  
Old 12-04-2008, 10:32 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Not totaly true. If properly encoded the Xbox can playback mpeg4HD content
I agree... and I posted in the forums about my success of playing 1280p content on the xbox using mpeg2. It works fine, and I do that now, for my xbox

Just to reiterate what jreichen noted above.... it appears that python 2.6 has native support for json... so if you were using that... it should given even better performance.

And yeah... I've looked at it for linux, and I'm very tempted to get an AppleTV just so that I can use it there
Reply With Quote
  #30  
Old 12-04-2008, 10:54 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
So one question though. When I do something like this:

http://<server>:8080/sagex/rpcXml/Database/SearchByTitle/SomeTitle

it returns an array reference. How would I go about getting the object?
Reply With Quote
  #31  
Old 12-04-2008, 11:12 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Nevermind. I found it in your wiki.
Reply With Quote
  #32  
Old 12-04-2008, 01:16 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
stuckless I am having problems parsing the xml with standard tools since the returned xml is not well formed. Would it be possible to have it start each xml with something like this:

<?xml version="1.0" encoding="UTF-8"?>
Reply With Quote
  #33  
Old 12-04-2008, 06:54 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mikwilli View Post
stuckless I am having problems parsing the xml with standard tools since the returned xml is not well formed. Would it be possible to have it start each xml with something like this:

<?xml version="1.0" encoding="UTF-8"?>
Sure, I'll try to get a release out tonight.
Reply With Quote
  #34  
Old 12-04-2008, 07:01 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
You can download 6.4.8-8, it now includes the xml declaration line.
Reply With Quote
  #35  
Old 12-04-2008, 07:28 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Woot! I can't wait to see what mikwilli has done!

****off topic alert****
BTW stuckless, interesting smatterings on your blog. I just bookmarked it My brother-in-law could use that visual meta data tool. It kinda reminds me of the one brewing in the XBMC forums. Have you seen that one?
Reply With Quote
  #36  
Old 12-04-2008, 08:52 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
My brother-in-law could use that visual meta data tool. It kinda reminds me of the one brewing in the XBMC forums. Have you seen that one?
I haven't see it. I must admit, It's been awhile since I've been in the xbmc forums. I haven't even updated my xbox in about a year, so I'm a little behind in the xbmc versions as well.

I'm going to update this weekend, and I want to try out mikwilli's script.
Reply With Quote
  #37  
Old 12-05-2008, 01:31 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
I made some progress, but am completely stuck at the moment. For some reason I can't grab the ref attribute from the xml generated by a call like this:

http://192.168.2.100:8080/sagex/rpcX...how/18996396:0

The XML is:
<response>
<header>
</header>
<body>
<objectRef ref="9874917"/>
</body>
</response>

When I check the xml.dom.minidom.Node though for objectRef it has no attributes. All the other xmls are parsing fine so I am going to have to see if something jumps out at me tomorrow.

BTW. This is much faster with the Title search than previous so it should be nice once I figure this out
Reply With Quote
  #38  
Old 12-05-2008, 06:42 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
That does seem odd.... the xml is valid. I wonder if minidom doesn't like empty elements.

If you want, you can send me your code, and I can take a look as well. I'm not very fluent python, but I have dabbled in it over the years.
Reply With Quote
  #39  
Old 12-05-2008, 10:29 AM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Well I wrote up a small Node iterator for the DOM and got this as a result which is exactly what it shows in the xml.
Type: ELEMENT_NODE
Name: objectRef
Value: None
Type: ATTRIBUTE_NODE
Name: ref
Value: 12452934
Type: TEXT_NODE
Name: #text
Value: 12452934
Type: TEXT_NODE
Name: #text
Value:

I'll try to figure out what I'm doing wrong with the piece calling the attribute. If it doesn't work itself out shortly I'll post the code.
Reply With Quote
  #40  
Old 12-05-2008, 10:32 AM
Brent Brent is offline
SageTVaholic
 
Join Date: May 2006
Location: KC, Missouri
Posts: 3,695
Ok. Sorry to pollute this thread buy I have to ask you guys in the know.

Why would you go through this trouble? What do you like with XBMC that you don't about SageTV. And what do you need from SageTV that you aren't getting from XBMC...

I'm a curious one - especially about HTPC software.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any interest in a plugin to support/control the Sony XL1B firewire DVD changer? TerryMathews SageTV Customizations 74 07-21-2011 02:24 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
XBMC plugin for SageTV jhh SageTV Customizations 45 04-19-2009 01:16 PM
VMC's MyNetFlix Plugin in SageTV - WOOHOO! osburnfamily SageTV Customizations 8 06-17-2008 11:54 PM
STV Import: Weather Monitor deria SageTV Customizations 35 08-23-2006 08:15 PM


All times are GMT -6. The time now is 08:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.