SageTV Community  

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

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #201  
Old 06-04-2010, 04:17 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Correct use of SortLexical

Sean,

I'm trying to use SortLexical() and am having trouble getting the types to work out. My code is below:

Code:
    /**
     * Sort an ArrayList of Episodes by date recorded.
     * <p>
     * @param episodes An ArrayList of Episodes to be sorted.
     * @param descending false to sort from oldest to newest, true to sort from newest to oldest.
     * @return A sorted ArrayList or null if error.
     */
    public static ArrayList<Episode> sortByDateRecorded(ArrayList<Episode> episodes, boolean descending) {

        ArrayList<Episode> SortedEpisodes = new ArrayList<Episode>();
        if (!(SortedEpisodes instanceof ArrayList)) {
            System.out.println("sortByDateRecorded: Bad new SortedEpisodes.");
            return null;
        }

        SortedEpisodes = Database.SortLexical(episodes, descending, "tmiranda.mob.Episode.getDateRecorded");
        if (SortedEpisodes==null) {
            System.out.println("sortByDateRecorded: null SortedEpisodes.");
            return null;
        }

        System.out.println("sortByDateRecorded: Returning SortedEpisodes.");
        return SortedEpisodes;
    }
I get an error on the line trying to use SortLexical complaining about needing a type Object - and I see the JavaDoc says SortLexical expects Objects. The question is how do I cast things so that it works properly?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #202  
Old 06-04-2010, 04:31 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
I'm trying to use SortLexical() and am having trouble getting the types to work out. My code is below:

Code:
    public static ArrayList<Episode> sortByDateRecorded(ArrayList<Episode> episodes, boolean descending) {

        ArrayList<Episode> SortedEpisodes = new ArrayList<Episode>();


        if (!(SortedEpisodes instanceof ArrayList)) {
            System.out.println("sortByDateRecorded: Bad new SortedEpisodes.");
            return null;
        }


        SortedEpisodes = Database.SortLexical(episodes, descending, "tmiranda.mob.Episode.getDateRecorded");
        if (SortedEpisodes==null) {
            System.out.println("sortByDateRecorded: null SortedEpisodes.");
            return null;
        }

        System.out.println("sortByDateRecorded: Returning SortedEpisodes.");
        return SortedEpisodes;
    }
I get an error on the line trying to use SortLexical complaining about needing a type Object - and I see the JavaDoc says SortLexical expects Objects. The question is how do I cast things so that it works properly?
Tom, the code, I bolded is redundant. Since your method can only accept ArrayList types then checking the type to be an ArrayList can never fail.

The other thing is the the method that you pass in the sort lexical, must be in the STV format (i'm pretty sure), so tmiranda_mob_Episode_getDateRecorded.

I've never used SortLexical myself, and the javadoc is a little ambiqious... but think the value that you'd want for the method would simply be "getDateRecorded", or "tmiranda_mob_Episode_getDateRecorded" and the first arg must be the Object (ie Episode).

Hope this helps.
Reply With Quote
  #203  
Old 06-04-2010, 04:42 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean,

1. How do I check if new worked or not? Do I just assume it worked? Check for null?

2. I tried the following for the line in question and nothing worked:

Code:
SortedEpisodes = Database.SortLexical((Object)episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

(Object)SortedEpisodes = Database.SortLexical((Object)episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

(Object)SortedEpisodes = Database.SortLexical(episodes, descending, "tmiranda_mob_Episode_getDateRecorded");
Suggestions?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #204  
Old 06-04-2010, 05:59 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Can i see the code where you get what you are sorting please. Are you passing it correctly is what I am wondering as what you did should work. I am wondering if you are really passing an array list or not.
Reply With Quote
  #205  
Old 06-04-2010, 06:01 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Plucky,

The method is completely listed in the post. It won't compile so I don't think it has anything to do with what I'm passing into it

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #206  
Old 06-04-2010, 06:56 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I see that now sorry missed it

anyhow I am pretty sure you need to pass it like this been a while since I last used this call

Code:
SortedEpisodes = Database.SortLexical((Object)episodes, true, "tmiranda_mob_Episode_getDateRecorded");
no descending and I am pretty sure it wants a Object but could be wrong as it as been a while

but in descending i know it wants a true or false

edit don't think you need to cast it at all to an object or object[]
Reply With Quote
  #207  
Old 06-04-2010, 07:01 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
After reading the java docs again it will return an object[] not an array. If it is passed an array as you are it will return an object[]
Reply With Quote
  #208  
Old 06-04-2010, 07:04 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Sean,

1. How do I check if new worked or not? Do I just assume it worked? Check for null?

2. I tried the following for the line in question and nothing worked:

Code:
SortedEpisodes = Database.SortLexical((Object)episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

(Object)SortedEpisodes = Database.SortLexical((Object)episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

(Object)SortedEpisodes = Database.SortLexical(episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

Suggestions?
Tom, as per the javadoc for the SortLexical, the return type is an Object[] array, not a list. So you cannot cast return from SortLexical to your original list.

you need something like this... (this is freehand, so may now compile as is)
Code:
Object result[] = Database.SortLexical(episodes, true, "tmiranda_mob_Episode_getDateRecorded");

if (result!=null) {
    // covert to array, if that's what your want...
    return Arrays.asList(result);
}
btw, where possible, unless you NEED to have a speciific list type of ArrayList, you should just use List.

ie
Code:
List<Episode> list = new ArrayList<Episode>();

or 

public static List<Episode> sortByDateRecorded(List<Episode> episodes, boolean descending) {
good luck
Reply With Quote
  #209  
Old 06-04-2010, 07:32 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Also sorry tom I completely missed your descending was a boolean
Reply With Quote
  #210  
Old 06-04-2010, 08:03 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean, Plucky,

Thanks, but I could not get it to compile with the results specified as Object[]. The following did compile, but I have no idea if it will do what I want. I stripped away all but the bare essentials.

Notice that SortLexical is returning "Object results" not "Object results[]".

Code:
    public static List<Episode> sortTest1(List<Episode> a, boolean b) {       
        Object results = Database.SortLexical(a, b, "tmiranda_mob_Episode_getDateRecorded");
        return Arrays.asList((Episode)results);
    }
Is it kosher to cast "results" in the return statement like I did? It compiled but it doesn't look to me like it will work casting an Object to Episode and then making it into a List.

Thanks for the tip on List instead of ArrayList.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #211  
Old 06-04-2010, 08:16 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Sean, Plucky,

Thanks, but I could not get it to compile with the results specified as Object[]. The following did compile, but I have no idea if it will do what I want. I stripped away all but the bare essentials.

Notice that SortLexical is returning "Object results" not "Object results[]".

Code:
    public static List<Episode> sortTest1(List<Episode> a, boolean b) {       
        Object results = Database.SortLexical(a, b, "tmiranda_mob_Episode_getDateRecorded");
        return Arrays.asList((Episode)results);
    }
Is it kosher to cast "results" in the return statement like I did? It compiled but it doesn't look to me like it will work casting an Object to Episode and then making it into a List.

Thanks for the tip on List instead of ArrayList.

Tom
That will fail... results is an Object[] and you are casting it an Episode... so the while the compiler likes it... the runtime wont

The easy fix it to change your return on the function to be Object[] and then cast results to Object[]

Code:
    public static Object[] sortTest1(List<Episode> a, boolean b) {       
        Object results = Database.SortLexical(a, b, "tmiranda_mob_Episode_getDateRecorded");
        return (Object[])results;
    }
The STV code probably won't know the difference between a List and an Object array. But you want a List returned, then you'll have to build up the list yourself. I don't think you can cast a list to a generic type. ie, List<Episode> list = (List<Episode>)Arrays.asList((Object[])results); I don't think that code is valid.

So, my solution would be to change the return type to Object[]
Reply With Quote
  #212  
Old 06-04-2010, 08:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean,

The method is not being called by the STV, it's used inside my Java code so I need to deal with the type conversion.

This compiles, but do you think it will work or is it just doing the same thing that you said in your last post was probably invalid? My return statement looks different than yours

Code:
    public static List<Episode> sortByDateRecorded(List<Episode> episodes, boolean descending) {

        Object Results = Database.SortLexical(episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

        if (Results==null) {
            System.out.println("sortByDateRecorded: null Results.");
            return null;
        }

        return Arrays.asList((Episode)Results);
    }
Edit: Answer to my own question - It won't work.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.

Last edited by tmiranda; 06-04-2010 at 08:53 PM.
Reply With Quote
  #213  
Old 06-05-2010, 05:48 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Tom, try this..
Code:
    public static List<Episode> sortByDateRecorded(List<Episode> episodes, boolean descending) {
        Episode Results[] = (Episode[])Database.SortLexical(episodes, descending, "tmiranda_mob_Episode_getDateRecorded");

        if (Results==null) {
            System.out.println("sortByDateRecorded: null Results.");
            return null;
        }

        return Arrays.asList(Results);
    }
I've made the assumption that the DatabaseSortLexical will return an Episode[] array, which will, since it's documented as returning an Object[] array, any my input is typed to be an Episide list.
Reply With Quote
  #214  
Old 06-08-2010, 05:53 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean,

Just to put a bow around this issue. I did not try what you suggested but I think I know the solution - I need to learn more Java

What I really need to do is implement a custom comparator so I can use sort() on my list directly rather than relying on using another method to do the sort. I think that will be a lot cleaner than using Sage's "SortByMethod", what think you? Am I on the right track?

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #215  
Old 06-08-2010, 07:31 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Sean,

Just to put a bow around this issue. I did not try what you suggested but I think I know the solution - I need to learn more Java

What I really need to do is implement a custom comparator so I can use sort() on my list directly rather than relying on using another method to do the sort. I think that will be a lot cleaner than using Sage's "SortByMethod", what think you? Am I on the right track?

Tom
Actually, I was going to suggest using the Collections.sort() and a custom comparator... but I didn't know if it would be more complicated than just using the sage api. Personally, I use comparators all the time.
Reply With Quote
  #216  
Old 06-08-2010, 07:49 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
The project I am working on is a learning exercise so I might as well learn how to use comparitors. I read up on it yesterday and it does not seem too difficult. I need to learn more because I see all kinds of warnings to make sure you do not do something that gives results inconsistent with the equals() method, and I'm sure what equals() should return for a custom collection.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #217  
Old 07-18-2010, 07:09 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean,

I think I found a bug. I'm getting a null pointer exception from FavoriteAPI.IsAutoDeleteAfterConversion(). I also noticed that the name of the API does not fully match the name of the corresponding Sage FavoriteAPI IsDeleteAfterAutomaticConversion() so I may be doing something wrong. Here is the test code:

Code:
        Object[] SageFavorites = FavoriteAPI.GetFavorites();

        if (SageFavorites==null || SageFavorites.length==0) {
            Log.getInstance().write(Log.LOGLEVEL_TRACE, "sync: No SageFavorites.");
            return true;
        }

        Log.getInstance().write(Log.LOGLEVEL_TRACE, "sync: Found SageFavorites = " + SageFavorites.length);

        System.out.println("START TEST:");
        for (Object F : SageFavorites) {
            FavoriteAPI.IsAutoDeleteAfterConversion(F);
        }
        System.out.println("END TEST:");
And here is the result:
Code:
Sun 7/18 8:57:27.245 [SageTV@eee4dc] BU: sync: Found SageFavorites = 102
Sun 7/18 8:57:27.246 [SageTV@eee4dc] START TEST:
Sun 7/18 8:57:27.246 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.246 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.246 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.247 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.248 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.248 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
Sun 7/18 8:57:27.252 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.252 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.253 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.254 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.254 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.259 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.259 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
Sun 7/18 8:57:27.260 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.260 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.260 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.261 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.261 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.261 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.270 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.271 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.271 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.271 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.271 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.271 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
Sun 7/18 8:57:27.272 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.272 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.272 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.273 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.273 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.273 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.283 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.284 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.284 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.293 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.293 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.293 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
Sun 7/18 8:57:27.294 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.294 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.295 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.295 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.295 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.295 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.295 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.296 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.296 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.296 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.296 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.296 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
Sun 7/18 8:57:27.297 [SageTV@eee4dc] java.lang.NullPointerException
Sun 7/18 8:57:27.298 [SageTV@eee4dc] 	at sage.e$e.a(Unknown Source)
Sun 7/18 8:57:27.298 [SageTV@eee4dc] 	at sage.e.a(Unknown Source)
Sun 7/18 8:57:27.299 [SageTV@eee4dc] 	at sage.SageTV.api(Unknown Source)
Sun 7/18 8:57:27.299 [SageTV@eee4dc] 	at sagex.remote.EmbeddedSageAPIProvider.callService(EmbeddedSageAPIProvider.java:16)
Sun 7/18 8:57:27.299 [SageTV@eee4dc] 	at sagex.SageAPI.call(SageAPI.java:163)
Sun 7/18 8:57:27.309 [SageTV@eee4dc] 	at sagex.api.FavoriteAPI.IsAutoDeleteAfterConversion(FavoriteAPI.java:201)
Sun 7/18 8:57:27.309 [SageTV@eee4dc] 	at tmiranda.backup.BUFavorite.sync(BUFavorite.java:118)
Sun 7/18 8:57:27.309 [SageTV@eee4dc] 	at tmiranda.backup.plugin.start(plugin.java:71)
Sun 7/18 8:57:27.309 [SageTV@eee4dc] 	at sage.plugin.a.byte(Unknown Source)
Sun 7/18 8:57:27.309 [SageTV@eee4dc] 	at sage.SageTV.run(Unknown Source)
Sun 7/18 8:57:27.310 [SageTV@eee4dc] 	at java.lang.Thread.run(Unknown Source)
I'm using Sage7 beta 11 and sagex-api 7.0.11.0.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #218  
Old 07-18-2010, 07:23 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
The apis are generated from the javadoc (you probably knew that) and it was wrong up until 7.0.12. The apis need to be regenerated so they have the right method name.
__________________
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
  #219  
Old 07-18-2010, 07:29 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
John,

I suspected that, but being a java noobie I thought it was better to blame myself for doing something wrong before I blamed somebody else

Thanks for confirming this.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #220  
Old 07-18-2010, 07:40 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Tom, I refreshed the sagex-apis based on what sage has published (hopefully it's the 7.0.12 apis).

The files should be available for download in the repository and the google code project.

I suspect that the null pointer is related to fact that the API name was wrong (which would have been that was in the previous JavaDoc on which the previous build was made)
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
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


All times are GMT -6. The time now is 12:59 PM.


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