|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#41
|
||||
|
||||
Quote:
I've uploaded a new version 6.4.8-4 which resolves this issue. You will need to update both your server and client projects with the new jar file. I discovered, as you noted, that if the request was larger than a few K in size then the server would through an IO exception when reading the request data. This really surprised me since i've never had an issue posting very large documents to a server url. I tried, post and I also tried using post with multipart/form-data and still no luck. This may be an issue with the servlet container in the tiny webserver that neilm uses, or it may have been an issue in how the post was contructed, either way, it didn't work So, against my better judgement, I changed the Java RPC to use RMI instead of HTTP. It now works, and I was able to run your example and sort the 2800 titles from my database (remotely). On another note.... Shadeblue, please note that the api call to force a particular server no longer exists... Code:
sagex.SageAPI.setProvider(new SageAPIRemote(YOUR_SERVER_URL)); Code:
sagex.SageAPI.setProvider(new RMISageAPI(host,port));
__________________
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 Last edited by stuckless; 11-18-2008 at 07:57 PM. |
#42
|
||||
|
||||
Quote:
Thanks, shadeBlue
__________________
Server Hardware: Intel Core 2 Quad Q6700 2.66GHz CPU, 4GB DDR2 RAM, NVIDIA nForce 780i SLI Motherboard, GeForce 8600 GT, Seagate Barracuda 7200.11 2.5TB Operating System: Windows XP Professional HTPC/DVR Software: SageTV 7 Capture Devices: 2 @ Hauppauge HD-PVR (1212), Hauppauge WinTV-HVR-1600 ATSC/QAM, HD Homerun Media Extenders: 2 @ Sage HD100 & 1 @ Sage HD200 Signals/Providers: AT&T UVerse, OTA ATSC Set-Top-Box: 2 @ Motorola Box VIP 1200 |
#43
|
||||
|
||||
Quote:
Before starting development with your plugin, I was looking into Hessian as a remoting solution for my needs, have you looked into Hessian as an alternative? I tried getting it started up as a servlet using the Tiny web server, but I was not successful, probably because I did not know what I was doing :-) Thanks, shadeBlue
__________________
Server Hardware: Intel Core 2 Quad Q6700 2.66GHz CPU, 4GB DDR2 RAM, NVIDIA nForce 780i SLI Motherboard, GeForce 8600 GT, Seagate Barracuda 7200.11 2.5TB Operating System: Windows XP Professional HTPC/DVR Software: SageTV 7 Capture Devices: 2 @ Hauppauge HD-PVR (1212), Hauppauge WinTV-HVR-1600 ATSC/QAM, HD Homerun Media Extenders: 2 @ Sage HD100 & 1 @ Sage HD200 Signals/Providers: AT&T UVerse, OTA ATSC Set-Top-Box: 2 @ Motorola Box VIP 1200 |
#44
|
||||
|
||||
Quote:
I'll continue to look into a http solution, but in the mean time, you can attempt to use the Hessian solution if you write your own SageAPIProvider. Typically, I create a RemoteRequest object, fill it with the request data, and then send it to a server where it get handled by the AbstractRPCHandler and sends back a RemoteResponse. Check out the RMISageAPI and the SageRemoteCommandServer for how the RMI piece works.
__________________
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 |
#45
|
||||
|
||||
New Release 6.4.8-5
You can download from here
Just a note about upgrading.... because I use versioned jar names, when you install a new jar, you MUST remove the other jar. shadeblue, I added back the java over http (but rmi is still the default unless you force the remote url). Keep in mind that it will fail for very large parameters using neilm's webserver. I've tested under jetty, and it doesn not have the same issue. So, if you know you are going to be passing around large arrays (not array refs), then make sure it's running under jetty. This instructions for installing under jetty are in wiki. If you are going install it under jetty and you already have it installed under niem's server, then you only need to run it in one place. This release also add a generic way of forcing a remote url. The api will check for the existence of a property called, sagex.SageAPI.remoteUrl. So you can set it via a commandline or by using System.setProperty() Code:
# java -Dsagex.SageAPI.remoteUrl=http://host:port/sagex/rpcJava # java -Dsagex.SageAPI.remoteUrl=rmi://host:port Code:
{ System.setProperty("sagex.SageAPI.remoteUrl", remoteUrl); .... String titles[] = Database.GetAllTitles(); }
__________________
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 |
#46
|
||||
|
||||
Quote:
Thank You, shadeBlue
__________________
Server Hardware: Intel Core 2 Quad Q6700 2.66GHz CPU, 4GB DDR2 RAM, NVIDIA nForce 780i SLI Motherboard, GeForce 8600 GT, Seagate Barracuda 7200.11 2.5TB Operating System: Windows XP Professional HTPC/DVR Software: SageTV 7 Capture Devices: 2 @ Hauppauge HD-PVR (1212), Hauppauge WinTV-HVR-1600 ATSC/QAM, HD Homerun Media Extenders: 2 @ Sage HD100 & 1 @ Sage HD200 Signals/Providers: AT&T UVerse, OTA ATSC Set-Top-Box: 2 @ Motorola Box VIP 1200 |
#47
|
||||
|
||||
I prefer using HTTP also. Thanks for adding it back.
I changed it over to using Jetty. The sorting now returns without error, but when I try to call another Sage API on an item in the sorted array, it doesn't return anything. If I leave out the call to sort, it works fine. Here's the code: Code:
Object[] airings = (Object[]) sagex.SageAPI.call("SearchByTitle", new Object[] {"Seinfeld"}); Object[] params = new Object[] {airings, true, null}; airings = (Object[]) sagex.SageAPI.call("Sort", params); for (int i = 0; i < airings.length; i++) { Object airing = airings[i]; String title = (String) sagex.SageAPI.call("GetAiringTitle", new Object[] {airing}); System.out.println("Title: " + title); }
__________________
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. |
#48
|
||||
|
||||
jreichen, i'll look into this api issue tonight. Curious as to why you are using the SageAPI.call() directly and not the wrappers? Not that it would fix this issue, but it would reduce the chance for typos, and the API wrappers would negate the need to create the object arrays.
__________________
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 |
#49
|
||||
|
||||
I've also been considering adding the Remote API functionality into Gregs typed API. It would probably work something like this...
Code:
// Api api = new Api(); Api api = APIFactory.newInstance(); MediaFileAPI.List files = api.mediaFileAPI.GetMediaFiles(); Any thoughts?
__________________
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 |
#50
|
||||
|
||||
Quote:
__________________
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. |
#51
|
||||
|
||||
Quote:
The factory is a good idea, but I also like how I can directly create a provider (embedded, XML RPC, Java RMI, etc) in the current remote API code. Combine those creation patterns with the object model of Greg's API and that would be a good thing. Question about the API class and its subclasses: would the API class be like your EmbeddedSageAPIProvider, then subclasses for the various remote implementations would implement their own constructors (and/or getters/setters) and call() methods? Another way would be to make API an interface then all implementations implement that interface, unless that would break too much existing code that uses Greg's API. Keep up the great work
__________________
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. |
#52
|
||||
|
||||
Quote:
Quote:
__________________
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 |
#53
|
||||
|
||||
New Release 6.4.8-6
Fixed Sort/Array bug that jreichen found. You can down from the download from here.
__________________
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 |
#54
|
||||
|
||||
Quote:
Code:
Object[] airings = (Object[]) sagex.SageAPI.call("SearchByTitle", new Object[] {"Seinfeld"}); Object[] airings2 = (Object[]) sagex.SageAPI.call("SearchByTitle", new Object[] {"Dirty Jobs"}); Object[] params = new Object[] {airings, airings2}; airings = (Object[]) sagex.SageAPI.call("DataUnion", params); for (int i = 0; i < airings.length; i++) { Object airing = airings[i]; String title = (String) sagex.SageAPI.call("GetAiringTitle", new Object[] {airing}); System.out.println("Title: " + title); } Code:
Sage Provider Implementation: sagex.remote.javarpc.SageAPIRemote; http://192.168.25.102:8080/sagex/rpcJava java.io.StreamCorruptedException: invalid stream header: 6E756C6C at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280) at sagex.remote.MarshalUtils.unmarshal(MarshalUtils.java:26) at sagex.remote.javarpc.SageAPIRemote.callService(SageAPIRemote.java:60) at sagex.remote.javarpc.SageAPIRemote.callService(SageAPIRemote.java:87) at sagex.SageAPI.call(SageAPI.java:52) at test.TestSageRemoteAPI.main(TestSageRemoteAPI.java:43) Exception in thread "main" java.lang.RuntimeException: Failed to call command: DataUnion at sagex.remote.javarpc.SageAPIRemote.callService(SageAPIRemote.java:73) at sagex.remote.javarpc.SageAPIRemote.callService(SageAPIRemote.java:87) at sagex.SageAPI.call(SageAPI.java:52) at test.TestSageRemoteAPI.main(TestSageRemoteAPI.java:43) Caused by: java.io.StreamCorruptedException: invalid stream header: 6E756C6C at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280) at sagex.remote.MarshalUtils.unmarshal(MarshalUtils.java:26) at sagex.remote.javarpc.SageAPIRemote.callService(SageAPIRemote.java:60) ... 3 more
__________________
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. |
#55
|
||||
|
||||
You didn't by chance try this using the RMI provider (default) as well? I'm wondering if this is a similar issue to the issue that found when running under nielms webserver. I'll take a look
__________________
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 |
#56
|
||||
|
||||
I forgot to mention the RMI provider doesn't work for me. Even if I specify the IP address:
Code:
ISageAPIProvider provider = new sagex.remote.rmi.RMISageAPI("192.168.25.102", 1098); sagex.SageAPI.setProvider(provider);
__________________
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. |
#57
|
||||
|
||||
yeah... the sage api on the server does use the configured Sage Server from the sage configuration file. If you don't set any provider on the client side, then it will autodiscover the correct server based on your sage configuration.
As for your latest bug It's related to the fact that I don't do anything special to serialize Vectors. So i think that the vector comming back contains a bunch of Sage Airing objects which cannot be resolved on the client side. I'll fix this... but it may be a couple of weeks (unless it becomes a real issue for you). I want to focus my attention on the web based batch metadata updater.
__________________
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 |
#58
|
||||
|
||||
Not a problem. Thanks for the help.
__________________
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. |
#59
|
||||
|
||||
New Release 6.4.8-7 (JSON/JSONP support)
Jreichen recently provided me with JSON support for the Remote API. You can now request that your HTTP responses come back as JSON replies (javascript).
You can read the wiki entry for more information. It contains an example that gets a list of recorded shows from the server using javascript and JSONP. There are no other changes in this release, so there is no need to upgrade unless you want try out the JSON support. You can download from the usual place.
__________________
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 |
#60
|
|||
|
|||
Does the service expose a WSDL? Or something like it that could use to autogenerate a proxy class?
I'd like to integrate with a c# application, and it would save a ton of time... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hauppauge Remote Issue | yacht_boy | Hardware Support | 4 | 05-01-2008 09:25 PM |
MCE remote transmitting keypresses twice | arnabbiswas | Hardware Support | 1 | 02-22-2007 10:55 AM |
MCE Remote not work fully with Placeshifter | devinteske | SageTV Placeshifter | 5 | 02-08-2007 11:45 PM |
Harmony Remote IR Reciever Help | brundag5 | Hardware Support | 2 | 01-13-2007 09:08 PM |
How to get SageTV to release focus to NVDVD for remote | IncredibleHat | SageTV Software | 4 | 07-06-2006 07:47 AM |