|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#81
|
|||
|
|||
Quote:
here is my thinking I want am wanting to scale and cache a reflected image so it doesn't have to be turned and reflected everytime imag2= pheonix_api_CreateReflection(phoenix_api_GetFanartPoster(file)) ----pheonix_api_CreateScaledImage(image2,200,-1) Is this not possible? Does it have to be a file cale in the pheonix api as I am able to call attributes in the default api thanks again. |
#82
|
||||
|
||||
The code is possible... but imag2 will be cached on the filesystem after the CreateReflection call, but the call to CreateScaledImage will not create a cached scaled image since the input to create scaled image is a sage meta image.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#83
|
|||
|
|||
Quote:
So there is no way to scale a reflected image bummer as that is what is slowing things down for me is have to get the image and reflect it everytime. Works fine when there is only one but when you get up to 8 items with a reflection it slows it down a bit. Even though I am scaling the images before hand to like 5k sizez (they are small reflections) still slows down drawing the reflection So I don't know if it is possible but I will add it to my request to be able to scale and cache the reflections Also I can't get the phoenix calls to work at all doing this just fyi I can get the standard calls of imageutils to work but not the phoenix calls. |
#84
|
|||
|
|||
Got another questio for you stuckless Hope you are not tired of me yet
Is is possible to call the phoenix scaling to scale a entire library such as phoenix_api_CreateScaledImage(phoenix_api_GetFanArtPoster(IsDVD),200,-1) |
#85
|
||||
|
||||
no... the apis are a single file input, single scaled file output. Batch processing may be added in later builds, but it's not on the critcal path at the moment.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#86
|
|||
|
|||
Quote:
Understand worth asking and noted |
#87
|
|||
|
|||
Stuckless,
I am letting users change the default fanart and posters in my movie wall (using the same code as Ben) When scaling is turned on/used the scaling does not scale the new selected poster/background it still grabs the original. Is this an issue in the api or in my coding? |
#88
|
||||
|
||||
Quote:
Keep in mind the SetXXXPoster method was more of a POC and it didn't really pan out. I'd hold off on implementing that portion, since I don't know if that api will remain, as is. That being said, there are a number of bugs/enhancements in the image/caching apis that i'm working on, so I'll try to do something about this particular issue as well.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#89
|
|||
|
|||
Quote:
Yes it renames the selected image to the default image (0). It works great exceept for when scaling is on I am wondering if I set an attribute to pull fanart,0 and then tell that to scale if that will get around it may try it out. I hope the Setxxxposter calls don't go away they are nice as fanart cycling can slow things down a bit so being able to select posters and backgrounds is nice. Look foward to seeing the next build. thanks again. |
#90
|
|||
|
|||
Got another do you have to use .my files to be able to pull the metadata infomormation from your scraper or are there phoenix calls I am not aware of.
I am trying to get userrating and runtime. I can see this information on my screen as well as in the .my files BMI generates. I am trying to pull it into my app by pulling it out of the metadata using UserRating1 = GetMediaFileMetadata(FirstElement, "UserRating") --iPos = StringLastIndexOf(UserRating1, ".") -----UserRatingB = ImageDirectory + "\\Ratings\\" + Substring(UserRating1, 0 , iPos) + ".png" The image directory of cours is specified elsewhere. Is there are phoenix call I should be using here? |
#91
|
|||
|
|||
To elaborate on above I am thinking maybe it is BMI
I have attached two .my properties. Cars is showing the ratings correctly. The video_ts is not properties file. I noticed on the cars it addes the user rating again at the bottom? |
#92
|
||||
|
||||
I don't know what .my files are... so bmt does not use them.
As for userating... it's a arbitrary user rating (int or float), depending on how the provider passes it along. When you call user rating, UserRating1 = GetMediaFileMetadata(FirstElement, "UserRating"), you'll get get back 7, or 7.25, etc. It looks like in your code that you are simply using indexOf(".") assuming that it's a float. But when it's not a float, then the next call will likely fail, since indexOf() return -1 when it isn't found. WHat you should be be doing is... (pseudocode) UserRating = GetMediaFileMetadata(FirstElement, "UserRating") --- if UserRating==null ------ UserRating = "0"; --- ipos = StringLastIndexOf(UserRating1, ".") --- if ipos >= 0 ------ UserRating = Substring(UserRating, 0 , iPos) --- UserRating = java_lang_Math_min(UserRating, 10) --- UserRating = java_lang_Math_max(0, UserRating) --- UserRatingImage = ImageDirectory + java_io_File_separator + "Ratings" + java_io_File_separator + UserRating + ".png" ------ ImageWidget THere are number of things that you need to do... 1. if you get a value and you intend to do work on it... check for null... Failing to check for null will result in a lot of sage exceptions in the log file and it will have a negative impact on performance 2. if are using sage function calls, like StringLastIndexOf(), then you need to check for the possiblitliy that it could fail, ie, return -1 in this case. The way the code was setup, assumes the all user ratings were floats (8.25), but would fail with an exception if the userrating is an int (8). 3. If you are going to specify paths, then use the File.separator, so that Non-Windows users can enjoy your plugin as well. As it stands, only a windows user can actually use your plugin, since it has a hard coded \\ in the path. I don't think that there is anything in the phoenix apis that will help you here, i think that you just need to add better error checking around your existing code. As for the .properties... you will see some fields like UserRating repeated becaouse of how Sage handles the updates to the file. ie, when the sage api, SetMediaFileMetadata() is called, they open the file, append the line, and then close it. Because of java reads the properties files, then the last entry int he file for any given field will result in it's current value. So, don't get alarmed by the multiple entries. good luck
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient Last edited by stuckless; 05-13-2009 at 09:53 AM. |
#93
|
|||
|
|||
I figured out the "." just before reading this I have been messing with it all morning. Thanks for your further example of the if didn't think of that one.
Now the problem is I get a null returned allot even when there is a user rating in the properties file. The mpegs are working fine but the video_ts are not. |
#94
|
||||
|
||||
i think the release notes for 6.5.15 stated that there was fix in that build where dvds were not storing the extra metadata fields.
So, you'll need the 6.5.15 build and you'll need to reimport the metadta for dvds. the GetMediaFileMetadata() doesn't actually read the .properties files... those files are only created so that when the video is import/re-imported, then sage will read the file at that time and then store the metadata in it's internal container. Once a video is imported, you can delete the properties, but I tend to keep them around, so that when I re-import the videos, it doesn't have to do all the lookups again. Likewise, you can turn off the Sage's ability to update the .properties files as well, since sage is only doing that so when a video get re-imported, all the changes to the metadata will be re-imported as well.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#95
|
|||
|
|||
Thanks I a @$@#@ sometimes that was it. I swear I read those release notes but don't remember reading it as I wasn't using that call at the time.
Thanks again. |
#96
|
|||
|
|||
I am working on a new STV, and wanted to use the phoenix dynamic menu class. Is that code pretty stable and going to change much?
Thanks, Jeff |
#97
|
||||
|
||||
Jeff,
Phoenix has 2 sets of APIs... those that are publicly released, and those that are not The first group of apis is the list of apis that is listed in the first post of this thread. As new releases are built, then I update that post to include those APIs that are public. Every attempt will we made to ensure that a public API does not change, or if it does, then it will deprecated first, and not removed until some time later. Those apis that are not public (yet), ie, the phoenix dynamic menus, etc, may change, and I can't make any promises that they wont, until they have been utilzed more in the general phoenix project, and are deemed to be stable. I hope that answers your question.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#98
|
|||
|
|||
I will hold of a bit and see how it develops..
Thanks, Jeff |
#99
|
|||
|
|||
Stuckless got another one for you trying to use imageutils to create a image and thing I have the path expression wrong
Code:
phoenix_api_CreateImage("\\SageMCE\\PLuckyhdSMWScreens\\Themes\\Joker\\kingspade.png","[{name:reflection}]",false) |
#100
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |