|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||||
|
||||
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.
|
#22
|
||||
|
||||
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.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#23
|
|||
|
|||
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 |
#24
|
||||
|
||||
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).
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#25
|
||||
|
||||
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. |
#26
|
|||
|
|||
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.
|
#27
|
||||
|
||||
Quote:
This new API sounds damn exciting! |
#28
|
||||
|
||||
Quote:
|
#29
|
||||
|
||||
Quote:
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
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#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? |
#31
|
|||
|
|||
Nevermind. I found it in your wiki.
|
#32
|
|||
|
|||
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"?> |
#33
|
||||
|
||||
Sure, I'll try to get a release out tonight.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#34
|
||||
|
||||
You can download 6.4.8-8, it now includes the xml declaration line.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#35
|
||||
|
||||
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? |
#36
|
||||
|
||||
Quote:
I'm going to update this weekend, and I want to try out mikwilli's script.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#37
|
|||
|
|||
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 |
#38
|
||||
|
||||
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.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#39
|
|||
|
|||
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. |
#40
|
|||
|
|||
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. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |