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 06-25-2006, 04:45 PM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
SageTV database?

I was wondering if there is some type of database/schema that is running behind the scenes in sagetv.

I have a LOT of movies/shows...and it would be nice if I could connect to the sagetv database, and write queries against it. Like, for example, just making a simple report layout that shows me all the names of my shows.

I was hoping there is some interface to reach the sagetv data/database. I know there must be one. I just havent found out enough about it yet. Maybe its all internal private unpublished information? Or maybe if I use Studio, I can get access to it using the Studio programming?

Just curious.


Edit: I found this addin/utility. I might try it out. But I was wondering if there is something in SageTV I can query directly. Even if I have to write a program to it.
http://www.sage-community.org/index....gsXmlGenerator

Last edited by steingra; 06-25-2006 at 04:54 PM.
Reply With Quote
  #2  
Old 06-25-2006, 04:55 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by steingra
I was wondering if there is some type of database/schema that is running behind the scenes in sagetv. ... Or maybe if I use Studio, I can get access to it using the Studio programming?
All of the internal SageTV database info stored in wiz.bin is accessible through Studio via the SageTV API. Nielm accesses the data for his web server by having java classes loaded with the SageTV process.

- 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 06-25-2006, 05:06 PM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
Thats great! Guess its time I finally started using Studio. Just havent had a specific reason until now. I was hoping there was a way to dig into it.

Thanks.
Reply With Quote
  #4  
Old 06-26-2006, 10:06 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
And expect more advanced query features as part of 5.1. (some of them have already been updated in the online API docs)
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #5  
Old 06-26-2006, 10:37 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Narflex
And expect more advanced query features as part of 5.1. (some of them have already been updated in the online API docs)
Drool ...
Reply With Quote
  #6  
Old 06-26-2006, 04:53 PM
Morgan111's Avatar
Morgan111 Morgan111 is offline
Sage Fanatic
 
Join Date: Nov 2003
Location: Oak Ridge, Tennessee
Posts: 762
It would be great if you could also add an API that could retrieve the full filename of a picture library file. I was adding buttons below the picture/slideshow viewer for things like navigation,rotation,deletion but could not find any way to get the full name and extension of the picture.
Reply With Quote
  #7  
Old 06-26-2006, 05:01 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Check out:
  • GetFileForSegment(MediaFile,SegmentNumber)
  • GetSegmentsFiles(MediaFile)
The first one is really what you want, but the second one will return all the files for a MediaFile object.

- 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
  #8  
Old 06-26-2006, 05:04 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
GetFileForSegment() should tell you everything you need to know about the physical file on disk (assuming you know how to access the methods of a java.io.File).

Edit: Once again, Andy's quicker on the draw.
__________________
-- Greg
Reply With Quote
  #9  
Old 06-26-2006, 05:11 PM
Morgan111's Avatar
Morgan111 Morgan111 is offline
Sage Fanatic
 
Join Date: Nov 2003
Location: Oak Ridge, Tennessee
Posts: 762
Doh! I thought I had tried that one found a problem, but it works when I try it now. Thanks!
Reply With Quote
  #10  
Old 06-27-2006, 05:10 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
Since I do not see any "Since" param in the javadocs on the http://download.sage.tv/api/ api onsite.

How will I know which is 5 and which is 5.1??
I do not remember all the functions offhand, and I use it havily right now.

Can you add that field?
__________________
Server
SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1
Client
SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1

Using Nielm's Web server 2.22
Reply With Quote
  #11  
Old 06-27-2006, 06:02 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by alon24
Since I do not see any "Since" param in the javadocs on the http://download.sage.tv/api/ api onsite.
here's one
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #12  
Old 06-27-2006, 06:08 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
I stand corrected
__________________
Server
SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1
Client
SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1

Using Nielm's Web server 2.22
Reply With Quote
  #13  
Old 06-27-2006, 08:50 AM
Morgan111's Avatar
Morgan111 Morgan111 is offline
Sage Fanatic
 
Join Date: Nov 2003
Location: Oak Ridge, Tennessee
Posts: 762
Quote:
Originally Posted by Opus4
Check out:
  • GetFileForSegment(MediaFile,SegmentNumber)
  • GetSegmentsFiles(MediaFile)
The first one is really what you want, but the second one will return all the files for a MediaFile object.

- Andy
That works perfectly. Now how about a way to force an image resource to be reloaded? I have tried passing in the filename to an image widget from GetFileForSegment, and GetImageAsBufferedImage and UnloadImage, Refresh()...
So once I Update the picture file I cannot get it to display anything but the cached image (and thumbnail) until enough other pictures are displayed or rescanning the database. Any easy solution? Thanks.
Reply With Quote
  #14  
Old 06-27-2006, 12:06 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
No, last time I heard (3/05), there is no way of getting around the image cache, and that unloadimage does not work and can not work in 3d mode...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #15  
Old 06-28-2006, 12:55 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
If you're talking about tweaking an image in Photoshop or whatever during STV development, there are basically two strategies that work:

1. Use temporary filenames such as Temp1.png, Temp2.png, etc., bumping the number with each edit. Rename it to its permanent name only after you're done tweaking and are satisified with the appearance.

2. Implement an Exit & Restart command that launches a batch file or VBScript script just before exiting Sage. The script can then restart Sage after a short delay, thereby flushing the image cache.

On the other hand, if you're talking about writing code that actually overwrites image files dynamically at runtime, then you're going to be constantly butting heads with the image cache, and you'd best find another way to solve your problem that doesn't involve reusing the same filename for different images.
__________________
-- Greg
Reply With Quote
  #16  
Old 09-04-2010, 03:43 PM
lamanmi's Avatar
lamanmi lamanmi is offline
Sage Advanced User
 
Join Date: Sep 2004
Location: Kirtland, Ohio
Posts: 199
All,

I'm bringing back this old thread to see if there has been any progress on a method for having Sage re-load an image when the file itself has changed. I have tried "UnloadImage" but that does not seem to clear it out.

The only method that I have been able to get to work is to restart sage.

Any ideas greatly appreciated!
__________________
LaManSoft - InControl For Sage and HomeSeer
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 02:29 AM.


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