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 08-19-2012, 10:18 AM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Starting to develop for Sage

Hi There,

So, i've decided I want/need to get into Sage Dev! I've been doing some light reading around the place and things aren't adding up.

I am aware of STV's and STVi's along with the Sage Studio and Java API.

All, I know now is the STV file is for UI and some basic logic.

I want to get my hands dirty with the Java API really.

Is it possible to use the Java API on it's own to create logic and also the UI components or do I need to combine it with the Studio?

Basically, i'm looking for some sort of guide that connects everything together and demonstrates how to connect them.

Any pointers much appreciated.

Cheers,
Makko

P.S. My plan is to make a plugin that allows multiple users (parents) to be able to mark what they have watched and also an advanced search dialog. I would also like to connect to MySQL. Does Sage have it's own DB I can create tables in and query?
Reply With Quote
  #2  
Old 08-19-2012, 10:34 AM
KeithAbbott KeithAbbott is online now
Sage Icon
 
Join Date: Oct 2009
Location: Southeastern Michigan
Posts: 1,375
Quote:
Originally Posted by makko View Post
P.S. My plan is to make a plugin that allows multiple users (parents) to be able to mark what they have watched...
Are you aware of this plugin?

http://forums.sagetv.com/forums/showthread.php?t=53905
http://code.google.com/p/tmiranda/wiki/MultiUser
__________________
Server: MSI Z270 SLI Plus ATX Motherboard, Intel i7-7700T CPU, 32GB Memory, Unraid 6.11.5, sagetvopen-sagetv-server-opendct-java11 Docker (version 2.0.7)
Tuners: 2 x SiliconDust HDHomeRun Prime Cable TV Tuners, SiliconDust HDHomeRun CONNECT 4K OTA Tuner
Clients: Multiple HD300 Extenders, Multiple Fire TV Stick 4K Max w/MiniClient
Miscellaneous: Multiple Sony RM-VLZ620 Universal Remote Controls
Reply With Quote
  #3  
Old 08-19-2012, 04:47 PM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Quote:
Originally Posted by KeithAbbott View Post
Yes I am, I tried it but didn't think it could do what I wanted.

However, I didn't see the project page on Google. I still have it installed i'll try another go.

In saying that, I still want to get into dev.. I have a few projects I want to incorporate into sage.
Reply With Quote
  #4  
Old 08-19-2012, 05:47 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
The plugin should keep track of separate Watched status for all defined users. It does not add any special search features. All of the code is on Google so you can see how it all works however I would NOT recommend using it as a template if you have no Sage development experience.

To address some of your other questions:

- Sage uses an internal database and you have no direct access to it, you must use the APIs documented in the manual. Other developers have used various databases so it is possible to do that. Sage has a rudimentary way of storing and retrieving data, see the User Record API. If the database needs are modest I'd highly suggest using the User Records over an external database for a variety of reasons that I can elaborate on if you are interested.

- You can call static Java methods from within Studio. One of the manuals explains it in detail but basically the Java method must be static and you invoke it using the fully qualified method name using an underscore in place of the period. (So if the package name is tmiranda.mus.api you'd invoke tmiranda_mus_api_SomeStaticMethod()) There are lots of examples in numerous plugins.
__________________

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
  #5  
Old 08-19-2012, 06:33 PM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Thank you tmiranda,

I'll have a look at the code for that plugin. Are there any basic plugins you can think of that I could use a base?

I'm assuming there are no great guides on getting hooked into Java?

Another quick one: If you go down the Java route do you still need to do something with the studio or can you do it all from code?

Thanks.
Reply With Quote
  #6  
Old 08-20-2012, 07:27 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
For a simple plugin that uses Studio but no Java, look at Java Heap Monitor. CPU Meter is a plugin that uses Studio and Java.

If you want your plugin to have a user interface you need to do that is Studio. The only exception is if you write a "General" plugin because they use Java to implement the standard configuration interface.
__________________

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
  #7  
Old 08-20-2012, 05:29 PM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Ok, I've just checked out your Google Code page but I don't see the source for the two projects you've mentioned, do you share it?

When you mentioned having a look did you mean the source or just install and see?

Thanks.
Reply With Quote
  #8  
Old 08-21-2012, 05:27 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
It's all open source. Look here under Trunk: http://code.google.com/p/tmiranda/so...e/#svn%2Ftrunk

You will see all of the Java. The only way to see (and edit) the Studio code is through Studio. You install the plugin and then do a diff vs. the unmodified STV.
__________________

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
  #9  
Old 08-21-2012, 03:43 PM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Quote:
Originally Posted by tmiranda View Post
It's all open source. Look here under Trunk: http://code.google.com/p/tmiranda/so...e/#svn%2Ftrunk

You will see all of the Java. The only way to see (and edit) the Studio code is through Studio. You install the plugin and then do a diff vs. the unmodified STV.
Thanks, but I don't see the CPUMeter or Java Heap Monitor projects.. are they there?

Last edited by makko; 08-21-2012 at 03:48 PM.
Reply With Quote
  #10  
Old 08-22-2012, 05:19 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by makko View Post
Thanks, but I don't see the CPUMeter or Java Heap Monitor projects.. are they there?
Oops, they are not in the repository because I developed them before using google code.

For Java Heap Monitor, just install the plugin and then open up Studio. That's the only way to see Studio code anyway (and there is no Java in that plugin.)

When I get home tonight I'll see what I can do about uploading CPU meter.
__________________

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
  #11  
Old 08-23-2012, 11:28 AM
makko makko is offline
Sage User
 
Join Date: Mar 2010
Location: Tipperary, Ireland
Posts: 65
Cool, thanks.

Much appreciated!
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
Must i buy sageTV to Develop a plugin? chalise SageTV Software 4 03-11-2010 07:28 PM
Starting playback in Sage from java? beelzerob SageTV Studio 27 12-02-2008 11:44 AM
Starting over, best way to transfer Sage settings weeber SageTV Software 2 07-10-2007 11:50 AM
Starting Sage server now causes reboot Morgan111 SageTV Software 0 11-25-2006 11:48 PM
How to develop my own plug-in? Kalle SageTV Customizations 1 05-13-2004 12:02 AM


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


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