SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #101  
Old 06-25-2009, 03:28 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Quote:
Originally Posted by PLUCKYHD View Post
Do I need to put the main sagetv\sagetv\stvs in front of the filepath as well?
Yes, you need a complete file path. You can use:

Code:
sagemc_Themes_getThemeBaseDir()
This will get you to ...STVs\SageTV3\SageMCE\Themes\ and you can append the rest of your path from there.

You can also try
Code:
GetPathParentDirectory( GetDefaultSTVFile() )
This will get you to ...\SageTV\STVs\SageTV3\ and again you can append the rest from there.

Aloha,
Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #102  
Old 06-25-2009, 03:36 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Thanks mike figured that is what it was
Reply With Quote
  #103  
Old 06-27-2009, 09:20 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Just wanted to post an issue I noticed.

If you perform scaling transformation on a .png with say a transulecent center it seems to lose the transulucency and just turns to white or black during the scaling. Rotating it/changing perspectives doesn't seem to do this.

Great work again guys I love the new image utilities.
Reply With Quote
  #104  
Old 06-29-2009, 10:17 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay got another question about the ImageOverlay in Create Image I am confused about how to call the image path (again )

Code:
{name: overlay, image: 'src/test/images/test_small.png', opacity:0.5, x:100, y:100}
Above is from the imageapi Doc.

So lets say I am using the same image as above as an overlay I am confused on the "/" vs "\\" would I call this like

Code:
{name: overlay, image:' GetPathParentDirectory( GetDefaultSTVFile() ) "\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\kingspade.png" ',opacity:0.5, x:100, y:100}
now I know the above is not correct because it doesn't work but I am just curious where I am going wrong as obviously this wants the path called differently.

TIA
Reply With Quote
  #105  
Old 06-29-2009, 12:30 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Because the transformation is passed as a string, then when you specify the image, then you need to build it up. THere are several ways that could happend, but he most simplest would be simply string concatenation.

Code:
"{name: overlay, image:'" + GetPathParentDirectory( GetDefaultSTVFile() ) + "\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\kingspade.png" + "',opacity:0.5, x:100, y:100}"
Reply With Quote
  #106  
Old 07-01-2009, 01:58 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
Because the transformation is passed as a string, then when you specify the image, then you need to build it up. THere are several ways that could happend, but he most simplest would be simply string concatenation.

Code:
"{name: overlay, image:'" + GetPathParentDirectory( GetDefaultSTVFile() ) + "\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\kingspade.png" + "',opacity:0.5, x:100, y:100}"
Stuckless got some time to come back to this and still having issues it shows the fanart poster but not the overlay image

Code:
phoenix_api_CreateImage(phoenix_api_GetFanartPoster(GetElement(WallPosters, 1)),"[{name: overlay, image:'" + GetPathParentDirectory( GetDefaultSTVFile() ) + "\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\king diamond.png" + "',opacity:0.5, x:100, y:100},{name:scale,width:150,height:-1},{name:rotate,theta:-40}]",false)
I know the path is right because if I call
Code:
phoenix_api_CreateImage(GetPathParentDirectory( GetDefaultSTVFile() ) +"\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\king diamond.png","[{name:rotate,theta:-40}]",false)
It gets the image of joker diamond but when I try and get it to overlay the fanartposter above all I get it the fanartposter.

TIA for any insight
Reply With Quote
  #107  
Old 07-02-2009, 11:14 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I don't have any insight to offer I haven't extensively tested the overlay, and it might be that it simply doesn't work. If I get a chance, I'll try some tests to see how it works out.

Sean.
Reply With Quote
  #108  
Old 07-02-2009, 11:29 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I don't have any insight to offer I haven't extensively tested the overlay, and it might be that it simply doesn't work. If I get a chance, I'll try some tests to see how it works out.

Sean.
That's okay I know I am pushing your image apis to the limits at times but really do appreciate them.

Another question I noticed when giving transformed images "Tags" to make sure they go in specific folders you are limited to one transformation per tag is this by design? In other words if I do a rotate a 20 and another at 40 if I try and give them the same tag so they go in the same folder the second one in will be an invalid file.
Reply With Quote
  #109  
Old 07-04-2009, 09:24 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
New Build 1.36

I've uploaded a new phoenix build for testing. It adds support for fanart genres and actors. It also will look at the GetShowCategory() for TV files and set the mediatype to Movie is the show category is a movie.

FanartAPI
phoenix_api_GetFanartGenre(Object mediaObject, String genre) : String
phoenix_api_GetFanartGenres(Object mediaObject, String genre) : String[]
phoenix_api_GetFanartActor(Object mediaObject, String actor) : String
phoenix_api_GetFanartActors(Object mediaObject, String actor) : String[]

Genres
Genres can be be at the Fanart Folder level or the Media Type level.
FANART_FOLDER/Genres/Action/Action.jpg
FANART_FOLDER/TV/Genres/Action/Action.jpg
FANART_FOLDER/Movies/Genres/Action/Action.jpg

A call to phoenix_api_GetFanartGenre(null, "Action") would always return the genre at the top level.

A call to phoenix_api_GetFanartGenre(mediaFile, "Action") would return the fanart for the MediaType of the mediaFile, or default to the top level, if there isn't a a genre image for the MediaFile type.


Actors
Actors can exist in the following locations
FANART_FOLDER/Actors/Billy Ray/Billy Ray.jpg
FANART_FOLDER/Movies/Actors/Billy Ray/Billy Ray.jpg
FANART_FOLDER/Movies/A Good Movie/Actors/Billy Ray/Billy Ray.jpg
FANART_FOLDER/TV/House/Season 1/Actors/Billy Ray/Billy Ray.jpg

A call to phoenix_api_GetFanartActor(null, "Billy Ray") would always return the actor at the top level.

A call to phoenix_api_GetFanartActor(mediaFile, "Billy Ray") traverse the media file actor locations until it finds a match, and finally go to the top level if nothing was found.

Like all other Fanart, more than 1 Actor or Genre image can exist for a given Actor or Genre.

Supporting Genre and Actor fanart required a huge restructuring of the Fanart Code, so this is considered a test build. Although I have done extensive unit testing on each fanart api call to ensure that nothing is broken, I may have missed something.

Set the first post for a complete list of published APIs

Last edited by stuckless; 07-04-2009 at 09:45 AM.
Reply With Quote
  #110  
Old 07-04-2009, 11:23 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
So question is the actor/genre fanart going to be fetched by bmt eventually?

If not any chance of supporting a central actor folder instead of having to put every actor in it's own sub folder

Nice work
Reply With Quote
  #111  
Old 07-04-2009, 03:35 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
bmt may eventually fetch actor fanart, but I doubt it will fecth genre fanart.

I used the "phoenix" fanart model for actors and genres because it was easier to adapt to the existing directory based model.

I suspect for genres, that someone will post up a "genre" fanart pak that will simply extract into the correct format.
Reply With Quote
  #112  
Old 07-05-2009, 10:09 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
bmt may eventually fetch actor fanart, but I doubt it will fecth genre fanart.

I used the "phoenix" fanart model for actors and genres because it was easier to adapt to the existing directory based model.

I suspect for genres, that someone will post up a "genre" fanart pak that will simply extract into the correct format.
Okay thanks nice job I will play with it once I get power back up at my house darn storms. I would rather use your actor call then have to string my own file names like I do now.

As for the Genres it will be intersting to see if anyone does post any. I currently randomly draw fanart from within the genre and it looks pretty good but I am always open for better
Reply With Quote
  #113  
Old 07-06-2009, 01:43 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by PLUCKYHD View Post
I currently randomly draw fanart from within the genre and it looks pretty good but I am always open for better
I really like this method, it gives your collection a much more personal feel than a generic picture.
Reply With Quote
  #114  
Old 07-07-2009, 04:30 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
So for the new Genre support, is there a way to specify banner, background, or poster? Or does it assume only a single type of art for genres?

I currently use background and banners in my STVi. I use the banners for TV shows in the EPG screens and the Sage Recording screens. I use the backgrounds for the detailed info screens for recordings and videos. I use the genre icons when no fan art is found for a recording.

I don't currently use posters, but I would probably use the poster-style genre icons for grouping imported videos. And, of course, poster style icons could be used instead of the auto-generated preview thumbnails in many places...

OH and by the way, thanks for all your hard work on this - I'm glad to see some of the new features you've added recently and I'm amazed at how much time you must be spending just answering all the posts in this forum, I don't know how you have time to write code...
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #115  
Old 07-07-2009, 06:02 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Tiki View Post
So for the new Genre support, is there a way to specify banner, background, or poster? Or does it assume only a single type of art for genres?

I currently use background and banners in my STVi. I use the banners for TV shows in the EPG screens and the Sage Recording screens. I use the backgrounds for the detailed info screens for recordings and videos. I use the genre icons when no fan art is found for a recording.

I don't currently use posters, but I would probably use the poster-style genre icons for grouping imported videos. And, of course, poster style icons could be used instead of the auto-generated preview thumbnails in many places...
I have completely misunderstood how genre fanart works I assumed that genre fanart would have been a one size thing, where you would ask for the genre fanart for "Action" and it would return some Action genre images.

But from what you are saying, then there should 3 GetXXXGenre calls, one for poster, background and banner.

So the API would be...
Code:
GetFanartPosterGenre(mediaFile, genre)
GetFanartBackgroundGenre(mediaFile, genre)
GetFanartBannerGenre(mediaFile, genre)
And the folder structure would be
Code:
FANART_FOLDER/Genres/Posters/(image files)
FANART_FOLDER/Genres/Backgrounds/(image files)
FANART_FOLDER/Genres/Panners/(image files)
FANART_FOLDER/Movies/Genres/Posters/(image files)
FANART_FOLDER/Movies/Genres/Backgrounds/(image files)
FANART_FOLDER/Movies/Genres/Panners/(image files)
FANART_FOLDER/TV/Genres/Posters/(image files)
FANART_FOLDER/TV/Genres/Backgrounds/(image files)
FANART_FOLDER/TV/Genres/Panners/(image files)
Quote:
OH and by the way, thanks for all your hard work on this - I'm glad to see some of the new features you've added recently...
Glad I can help out. The genre stuff was added because I was hoping to entice you to start using the new apis

Quote:
...and I'm amazed at how much time you must be spending just answering all the posts in this forum, I don't know how you have time to write code...
I guess if I wrote better documentation and/or code, then I'd be spending less time supporting it in the forums And yet I still have time to watch a movie from time to time
Reply With Quote
  #116  
Old 07-07-2009, 06:42 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I have completely misunderstood how genre fanart works I assumed that genre fanart would have been a one size thing, where you would ask for the genre fanart for "Action" and it would return some Action genre images.

But from what you are saying, then there should 3 GetXXXGenre calls, one for poster, background and banner.

So the API would be...
Code:
GetFanartPosterGenre(mediaFile, genre)
GetFanartBackgroundGenre(mediaFile, genre)
GetFanartBannerGenre(mediaFile, genre)
And the folder structure would be
Code:
FANART_FOLDER/Genres/Posters/(image files)
FANART_FOLDER/Genres/Backgrounds/(image files)
FANART_FOLDER/Genres/Panners/(image files)
FANART_FOLDER/Movies/Genres/Posters/(image files)
FANART_FOLDER/Movies/Genres/Backgrounds/(image files)
FANART_FOLDER/Movies/Genres/Panners/(image files)
FANART_FOLDER/TV/Genres/Posters/(image files)
FANART_FOLDER/TV/Genres/Backgrounds/(image files)
FANART_FOLDER/TV/Genres/Panners/(image files)

Glad I can help out. The genre stuff was added because I was hoping to entice you to start using the new apis



I guess if I wrote better documentation and/or code, then I'd be spending less time supporting it in the forums And yet I still have time to watch a movie from time to time
I don't see a need for posters/banners for genres but that is just me seems like allot of fanart to keep up with (especially having to get this per user)

but to each his own

and yes I have decided you are a machine programed by Jeff to code for phoenix all day long with no sleep (seriously I don't konw how you do it.)
Reply With Quote
  #117  
Old 07-08-2009, 12:30 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Stuckless,

CreateImages seems to work great in the 1.33 phoenix build. Is it safe to start using getimage yet?
Reply With Quote
  #118  
Old 07-08-2009, 12:51 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by PLUCKYHD View Post
Stuckless,

CreateImages seems to work great in the 1.33 phoenix build. Is it safe to start using getimage yet?
Well, GetImage, passes the unit testing, but I'm not sure it's being used anywhere yet. So I would try it, and see what happens.
Reply With Quote
  #119  
Old 07-08-2009, 01:23 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
Well, GetImage, passes the unit testing, but I'm not sure it's being used anywhere yet. So I would try it, and see what happens.
Okay I will give it a go currently just scalingimages and then when I createimage I use the same tag just wondering if getimage will be more efficient
Reply With Quote
  #120  
Old 07-08-2009, 01:34 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Quote:
Originally Posted by PLUCKYHD View Post
I don't see a need for posters/banners for genres but that is just me seems like allot of fanart to keep up with (especially having to get this per user)

but to each his own
Just to give some examples of how I use genre banners and backgrounds... Here is how they work in my STVi (see attached screen shots). If there is no banner for a particular show, I look at the genre (category / subcategory) and display a generic banner. So, I have banners for "Movie", "Football", "Cooking", "Science", "Sitcom", etc. I just print the show title over the top of the banner in a bold font. Then in the recording details screen, I do sort of the same thing - if there is no background found, I look for a genre background.

I know SageMC uses genre icons for categorizing imported videos, and there is a nice collection of these that look like movie clapboards. Based on the size and shape of these, I would say they are similar to the "poster" art. I don't currently use any of this "poster" style genre art in my STVi right now, but I could see a use for it.
Attached Images
File Type: jpg GenreBannerProgramGuide.jpg (91.7 KB, 165 views)
File Type: jpg GenreBannerSageRecordings.jpg (73.5 KB, 162 views)
File Type: jpg GenreBackgroundRecordingDetail.jpg (74.7 KB, 173 views)
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
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
Phoenix card reader gravis12 Hardware Support 0 03-30-2008 01:38 PM
Missing API? GKusnick SageTV Studio 0 01-16-2007 08:48 PM
API Changes in 5.0 ? dflachbart SageTV Studio 11 05-09-2006 03:21 PM


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


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