![]() |
|
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 |
#1
|
|||
|
|||
Help - Trying to call GetScheduledRecordings from Java
I am trying to get a list of upcoming recordings from the SageTV api and it keeps on erroring out when I make the call. I was trying to make it simple since this is my first try in calling the api from Java. Here is the code:
public static void GetScheduleRec() { try { Object FileList = (Object[])sage.SageTV.api("GetScheduledRecordings", null); } catch (java.lang.reflect.InvocationTargetException e) { System.out.println("ERROR invoking SageTV API calls of: " + e.toString()); } } I know this is probably simple for most, but any help would be appreciated. Thank you, Dennis |
#2
|
||||
|
||||
Your posted code works for me. Maybe you could give more details about the exact error(s) you're getting.
__________________
-- Greg |
#3
|
|||
|
|||
I'm getting this message:
ERROR invoking SageTV API calls of: java.lang.reflect.InvocationTargetException Thanks for the reply |
#4
|
||||
|
||||
Are you running the java code inside a SageTV / SageTVService / SageClient process?
(you might also want to do e.printStackTrace(), and also print the e.getCause() if it exists)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki ![]() |
#5
|
|||
|
|||
Quote:
Quote:
java.lang.UnsatisfiedLinkError: no SageTVWin32 in java.library.path I have the Sage.jar included in the classpath. Is there something else I need to add? Thanks |
#6
|
||||
|
||||
Quote:
To read the info from Sage's internal classes/DB, the sage.SageTV.api() needs to be called in the context of a running SageTV/SageTVClient/SageService application. This means, either run the class as a separate thread (eg in my getstaus/webserver apps), which is run on startup by Sage, or being called from an STV (as in the rest of my plugins!) If you are trying to get some info from Sage to be used by another program, then you will need to set up some inter process communication between the 2 programs...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki ![]() |
#7
|
|||
|
|||
Thanks for your help, Niem!
|
#8
|
||||
|
||||
no problem -- good luck with the app...
Source code to my plugins is all in Sourceforge, if it helps... http://cvs.sourceforge.net/viewcvs.py/sageplugins/
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki ![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|