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
  #341  
Old 03-24-2011, 07:16 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by stuckless View Post
Have you tested the it to see if works or not?
I use it in the Windows Gadget (via "/sagex/media/logo/CHANNELNAME") and noticed that it stopped working after I started using the new logos. The new logos seem to be downloaded to the "GeneratedThumbnails" directory so they are somewhat "local".
__________________
-Craig
Reply With Quote
  #342  
Old 03-24-2011, 07:32 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
When I use that URL, I get a logo if it's stored in ChannelLogos but not if it's a default Sage logo. In that case I get an HTTP 404 "No Image" page.
__________________
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
  #343  
Old 03-24-2011, 08:30 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
In the next build, I've made some changes...

You can now use...
/media/logo/STATIONID instead of /media/log/CHANNELNAME.

using /media/log/STATIONID will use the new 7.1 apis for resolving logs, and you can also pass, type=small|medium|large, index=0|1|2, fallback=true|false (as per the API documentation).

Also, I've added a new encoder to /sagex/api, called 'image'. You can use this when calling an API method that returns an image. The onus is on YOU to tell sagex that you want an image, otherwise you'll get an encoded json/xml representation of the image (which is usually empty). I didn't want to add to much overhead to the existing processing to support this, so you'll need to pass encoder=image on the url.

Code:
http://localhost:8080/sagex/api?c=GetChannelLogo&1=channel:10092&2=Large&3=1&4=true&encoder=image
This should work for any api that returns an image (Image File, BufferedImage or SageTV MetaImage), such as MediaFileAPI.GetThumbnail

Also a few builds back I added image scaling to sages, so you can scale the images on the fly as well, using

Code:
http://localhost:8080/sagex/api?c=GetThumbnail&1=mediafile:845111&encoder=image&scalex=50&scaley=25
Reply With Quote
  #344  
Old 03-28-2011, 02:46 PM
bradvido's Avatar
bradvido bradvido is offline
Sage User
 
Join Date: Nov 2010
Location: MN
Posts: 68
Is there any way to make the sagex-api.log recycle? It's consuming my hard drive because I use the api so much:

Reply With Quote
  #345  
Old 03-29-2011, 01:32 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
If you have 24 gb log file, then there is probably an issue somewhere. Can you send me a portion of the log file... I suspect there must a large repeating section in the log.

But to answer your question, yes, you can reconfigure the logging, even turn it off if you want, but it requires tweaking the log4j settings.

You'll need to change the "Appender" to something like the org.apache.log4j.RollingFileAppender and then add a new configuration options to set the max size, # of backups, etc. You can configure this from the bmt web ui Configuration -> Log4j Logging -> Logging, and if you search the guide that is linked from that configuration page, for "RollingFileAppender Options", then you find the options.

I suspect you'll want to add options like...
log4j.appender.SAGEX.MaxFileSize=10MB
log4j.appender.SAGEX.MaxBackupIndex=1


I've attached a screenshot of the configuration page in bmt, and I've highlighted the sections that you'll need change/edit. And don't forget to click Save.
Attached Images
File Type: png sagex-logging.png (82.6 KB, 310 views)
Reply With Quote
  #346  
Old 04-01-2011, 08:58 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by stuckless View Post
In the next build, I've made some changes...

You can now use...
/media/logo/STATIONID instead of /media/log/CHANNELNAME.
What is the "STATIONID"?
__________________
-Craig
Reply With Quote
  #347  
Old 04-02-2011, 04:27 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by cncb View Post
What is the "STATIONID"?
StationID is the unique id assigned to a channel.

It's the only way I can lookup a channel.
Reply With Quote
  #348  
Old 04-02-2011, 07:20 AM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by stuckless View Post
StationID is the unique id assigned to a channel.
Is there any way the StationID could be provided with the Airing XML (with GetScheduledRecordings)?
__________________
-Craig
Reply With Quote
  #349  
Old 04-02-2011, 08:05 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by cncb View Post
Is there any way the StationID could be provided with the Airing XML (with GetScheduledRecordings)?
Well, just use airing.GetChannel().GetStationID()...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #350  
Old 04-02-2011, 08:10 AM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by Fonceur View Post
Well, just use airing.GetChannel().GetStationID()...
Can't really do that with the http api so it would be best for it to be in the XML for each airing like ChannelName is now.
__________________
-Craig
Reply With Quote
  #351  
Old 04-02-2011, 08:35 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by cncb View Post
Is there any way the StationID could be provided with the Airing XML (with GetScheduledRecordings)?
Originally I was excluding the serialization of the Channel object in airings because I didn't support it... but since I've added channel support, the airing xml will now return the serialized channel as well, which will contain the stationid (and other channel object fields, such as name, network, etc).

That'll be in the next build, which will likely go out today.
Reply With Quote
  #352  
Old 04-02-2011, 08:37 AM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by stuckless View Post
That'll be in the next build, which will likely go out today.
Thanks!
__________________
-Craig
Reply With Quote
  #353  
Old 04-02-2011, 12:49 PM
bradvido's Avatar
bradvido bradvido is offline
Sage User
 
Join Date: Nov 2010
Location: MN
Posts: 68
Thanks for the fix on the log size stuckless.
There aren't any errors, just excessive use
Reply With Quote
  #354  
Old 05-13-2011, 07:25 AM
bradvido's Avatar
bradvido bradvido is offline
Sage User
 
Join Date: Nov 2010
Location: MN
Posts: 68
When a method asks for a Sage Favorite object, what do i pass in as the parameter?

Edit, I see there is a favorite ID for favorites. So how can i obtain this ID? I know both the media file id and airing id, how do i get favorite id from that?
Currently the only way i see is to call getFavorites() and search for a match through all that junk.

Last edited by bradvido; 05-13-2011 at 07:31 AM.
Reply With Quote
  #355  
Old 05-13-2011, 07:49 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
FavoriteAPI.GetFavoriteForAiring(Airing)
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #356  
Old 05-13-2011, 07:54 AM
bradvido's Avatar
bradvido bradvido is offline
Sage User
 
Join Date: Nov 2010
Location: MN
Posts: 68
Is that possible to call using this remote API?

Edit: Doh. Just saw it. That FavoriteAPI part threw me off.
It's just under api?c=GetFavoriteForAiring


Thanks!

Last edited by bradvido; 05-13-2011 at 07:56 AM.
Reply With Quote
  #357  
Old 05-13-2011, 08:02 AM
bradvido's Avatar
bradvido bradvido is offline
Sage User
 
Join Date: Nov 2010
Location: MN
Posts: 68
What would be the best way to determine what recorded episodes are currently available for a given favorite. I see that it give me a list of airings, but i need to know which shows are currently available to watch for a favorite.
Reply With Quote
  #358  
Old 05-13-2011, 08:17 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I don't use the HTTP interface too often so you'll have to massage this somehow into an appropriate HTTP call, but this call should do it:

FilterByMethod(GetFavoriteAirings(GetFavoriteForID(12345)), "GetMediaFileForAiring", null, false)

That call should return all the recordings of the favorite. Replace the 12345 with the favourite id number.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #359  
Old 05-13-2011, 08:24 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
In case anyone is interested, I actually derived the above Studio call from the Groovy script below:

Code:
def fav = FavoriteAPI.GetFavoriteForID(153502)
def airings = FavoriteAPI.GetFavoriteAirings(fav)
def recordings = Database.FilterByMethod(airings, "GetMediaFileForAiring", null, false)
println "Found ${airings.size()} airing(s) and ${recordings.size()} recording(s) of favourite '${FavoriteAPI.GetFavoriteDescription(fav)}'"

// Equivalent Studio expression should be:
// FilterByMethod(GetFavoriteAirings(GetFavoriteForID(153502)), "GetMediaFileForAiring", null, false)
Output:

Found 74 airing(s) and 1 recording(s) of favourite 'The Office First Runs'

And, indeed, I have one recording of The Office on my system right now.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #360  
Old 05-13-2011, 09:14 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Slugger View Post
In case anyone is interested, I actually derived the above Studio call from the Groovy script below:

Code:
def fav = FavoriteAPI.GetFavoriteForID(153502)
def airings = FavoriteAPI.GetFavoriteAirings(fav)
def recordings = Database.FilterByMethod(airings, "GetMediaFileForAiring", null, false)
println "Found ${airings.size()} airing(s) and ${recordings.size()} recording(s) of favourite '${FavoriteAPI.GetFavoriteDescription(fav)}'"

// Equivalent Studio expression should be:
// FilterByMethod(GetFavoriteAirings(GetFavoriteForID(153502)), "GetMediaFileForAiring", null, false)
Output:

Found 74 airing(s) and 1 recording(s) of favourite 'The Office First Runs'

And, indeed, I have one recording of The Office on my system right now.
FYI... you could probably use the EvaluateExpression api if you wanted to do it all one line...

Code:
EvaluateExpression("FilterByMethod(GetFavoriteAirings(GetFavoriteForID(153502)), \"GetMediaFileForAiring\", null, false)");
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 01:01 PM.


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