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
  #1  
Old 10-08-2006, 07:13 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
GetRecentlyWatched() in 6.0 beta

Did the parameter semantics for GetRecentlyWatched() change ? In 5.x, it would return the whole watched-history when 0 is passed in, now it doesnt return any shows. Of course I can pass in Long.MAX_VALUE, just wanted to check if this is intended ...

Dirk
Reply With Quote
  #2  
Old 10-08-2006, 08:13 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
It is possible -- the docs don't say anything about a parameter of 0 having a special meaning & I know there was some sort of fix regarding how it handles its parameter.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 10-08-2006, 08:44 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
& I know there was some sort of fix regarding how it handled its parameter.

- Andy
So is the parameter still in milliseconds ?

The method seems to only allow Integer values as a parameter (up to 2147483647), any value larger than that returns an empty list. Max Integer only allows up to 24 days (in milliseconds), but it shows me shows older than 24 days (up to 8/16/06).

On the other hand, if i use 7*24*60*60*1000, it shows me the last 7 days...

Dirk
Reply With Quote
  #4  
Old 10-08-2006, 08:57 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Are you making sure to send a long instead of an integer?

Try sending Time(), to go back to the beginning of time as we know it.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #5  
Old 10-08-2006, 09:20 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
Are you making sure to send a long instead of an integer?
Good point ...

Is there a specific syntax for long values in Studio code ?
I tried 2147483648, 2147483648L, and new_java_lang_Long(2147483648), but neither worked ...

Quote:
Try sending Time(), to go back to the beginning of time as we know it.

- Andy
This works ...
So it's an issue of how to specify real long values in Studio.

Hmm, wait, this still doesnt answer why 2147483647 shows me more than 24 days ...

Dirk
Reply With Quote
  #6  
Old 10-08-2006, 09:42 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by flachbar
new_java_lang_Long(2147483648), but neither worked ...
Maybe it doesn't see the parameter as a long. The java docs say you can send it as a string too -- new_java_lang_Long("2147483648"), perhaps?

Quote:
Hmm, wait, this still doesnt answer why 2147483647 shows me more than 24 days ...
My guess is that it probably has something to do with that number being 1 bigger than the max integer value of 2^31 - 1.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #7  
Old 10-09-2006, 06:10 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
Maybe it doesn't see the parameter as a long. The java docs say you can send it as a string too -- new_java_lang_Long("2147483648"), perhaps?
Thx, I'll try this tonight. Can we get some official info if this is the preferred (and maybe only) way to specify Longs in Studio code ?

Quote:
My guess is that it probably has something to do with that number being 1 bigger than the max integer value of 2^31 - 1.

- Andy
Actually, 2147483647 is MAXINT (2^31-1)


Dirk
Reply With Quote
  #8  
Old 10-09-2006, 06:35 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by flachbar
Actually, 2147483647 is MAXINT (2^31-1)
Um... right. I think my calculator needs a new battery & I wasn't thinking properly when I wrote that one. Edit: Interesting... I had "checked" the number on my calculator, rather than cut & paste from somewhere. 2^31 had a 7 as the last digit & it didn't dawn on me that that can't be possible. (long story why I wouldn't have caught that lately) But, 2^30 * 2 gave the correct answer. Same for 2^32. Nice to know my calculator has a bug. Oh well, it is 23 years old or more, so I'm sure I can't get it fixed.

I'll have to double check on specifying large longs.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #9  
Old 10-09-2006, 10:40 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
new_java_lang_Long("2147483648") works in Expression Evaluator. Just typing 2147483648 as a bare number does not. (Parsing Error: Can't parse "2147483648")

Try submitting a bug report on it. Can't hurt, and we are in Beta.
__________________
-- Greg
Reply With Quote
  #10  
Old 10-09-2006, 10:55 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by flachbar
Can we get some official info if this is the preferred (and maybe only) way to specify Longs in Studio code ?
The below expressions worked, having tried them via the Expression Evaluator:

new_java_lang_Long("2147483648")
java_lang_Long_parseLong("2147483648")
"2147483648" * 1

So, converting them from strings worked, but this did not work:

new_java_lang_Long(2147483648)
2147483648

It seems to try making a straight number like this to always be an integer.

Oh, I see there's another reply about it while I was typing this & got called away from my desk.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
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


All times are GMT -6. The time now is 09:46 AM.


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