SageTV Community  

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

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-16-2011, 12:04 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
getting banners and other fanart using the phoenix api

a request and question about getting banners and other fanart using phoenix

api request:
GetSeriesBanners, Posters, and Backgrounds - to return an array of all the series banners posters and backgrounds... ie the same thing as GetFanartBanners, etc...

Resolving fanart for items that don't have a mediafile (ie airings that are scheduled in the future). How do you do this? It used to work... but now all calls to GetFanartXXX when i give it an airing object (ie mediafile object does not exist) return the same images as the first time i called it... it could be a problem/bug in my code but it used to work and all the debugging i've done points to me requesting the information correctly (ie im passing it the correct airing object). Also i use the same code for displaying mediafiles that do exist (ie recordings already completed/in progress) and that does work as expected...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #2  
Old 01-16-2011, 12:23 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by razrsharpe View Post
Resolving fanart for items that don't have a mediafile (ie airings that are scheduled in the future). How do you do this? It used to work... but now all calls to GetFanartXXX when i give it an airing object (ie mediafile object does not exist) return the same images as the first time i called it... it could be a problem/bug in my code but it used to work and all the debugging i've done points to me requesting the information correctly (ie im passing it the correct airing object). Also i use the same code for displaying mediafiles that do exist (ie recordings already completed/in progress) and that does work as expected...
stuckless is onto this and a fix should be in the next core release.

John
Reply With Quote
  #3  
Old 01-16-2011, 12:41 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by JREkiwi View Post
stuckless is onto this and a fix should be in the next core release.
And is in the repository now.

Thanks stuckless.

John
Reply With Quote
  #4  
Old 01-16-2011, 12:47 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
sweet thanks... working almost 100%

for titles that i am using the mediatitles.xml file to get a match on (ie. shows like Hawaii Five-0, Parenthood, Castle, etc) i do not get any fanart for them... I assume that's because the fanart title includes the year ie for parenthood, show title = "Parenthood", but the fanart title = "Parenthood (2010)"
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #5  
Old 01-16-2011, 01:36 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by razrsharpe View Post
sweet thanks... working almost 100%

for titles that i am using the mediatitles.xml file to get a match on (ie. shows like Hawaii Five-0, Parenthood, Castle, etc) i do not get any fanart for them... I assume that's because the fanart title includes the year ie for parenthood, show title = "Parenthood", but the fanart title = "Parenthood (2010)"
Yeah, that came up as well. I don't have a fix for that, yet
Reply With Quote
  #6  
Old 01-16-2011, 02:02 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by stuckless View Post
Yeah, that came up as well. I don't have a fix for that, yet
oki doki.. no big deal just thought i should point it out in case you hadn't seen it

not sure if saw this part of the original post or not... but just in case here it is again
Quote:
Originally Posted by razrsharpe View Post
api request:
GetSeriesBanners, Posters, and Backgrounds - to return an array of all the series banners posters and backgrounds... ie the same thing as GetFanartBanners, etc...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #7  
Old 01-16-2011, 02:38 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by razrsharpe View Post
not sure if saw this part of the original post or not... but just in case here it is again
GetSeriesXXX was something that I had recently added (for the Android app I'm working on), so it's not a complete. I'll make a note to add in the missing APIs.
Reply With Quote
  #8  
Old 01-17-2011, 10:58 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by stuckless View Post
I'll make a note to add in the missing APIs.
thanks

one more quick question...

Is fanart enabled (phoenix_fanart_IsFanartEnabled() returns true) on a system wide basis? (ie Fanart is enabled at the server level (via bmt web ui) and then all clients (including full pc clients) will inherit the servers setting? Or does each full client need to be configured to enable fanart seperately? And if so (which i think is the case) how do you recommend plugins accomplish setting that up ... Depending on Phoenix core services and setting it up in its setting, or have options to set the following two (and any other?) properties in the plugins option menu somewhere?
Code:
phoenix/mediametadata/fanartCentralFolder=PATH_TO_FANART_FOLDER
phoenix/mediametadata/fanartEnabled=true
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #9  
Old 01-17-2011, 11:11 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Just for reference you can already get series posters,banners, and such by using the fanartartificact part of the phoenix.fanart api. I use it in diamond you can get single or groups.

Code:
phoenix.fanart.GetFanartArtifacts(MediaObject,"tv",null,"poster",null,new HashMap<String,String>())
Just pass null as the next last argument and a empty or null hashmap as the last. The above would return all the posters of type tv for the mediaobject

This is what I do in diamond.
Reply With Quote
  #10  
Old 01-17-2011, 12:21 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by razrsharpe View Post
thanks

one more quick question...

Is fanart enabled (phoenix_fanart_IsFanartEnabled() returns true) on a system wide basis? (ie Fanart is enabled at the server level (via bmt web ui) and then all clients (including full pc clients) will inherit the servers setting? Or does each full client need to be configured to enable fanart seperately? And if so (which i think is the case) how do you recommend plugins accomplish setting that up ... Depending on Phoenix core services and setting it up in its setting, or have options to set the following two (and any other?) properties in the plugins option menu somewhere?
Code:
phoenix/mediametadata/fanartCentralFolder=PATH_TO_FANART_FOLDER
phoenix/mediametadata/fanartEnabled=true
I've tested this, since I don't have any clients, but I suspect that they are client settings. I think that if they client doesn't have them set, then it will pick up the server's value (which can be set from the web ui), but the client can override the setting.

Since phoenix core would be required on the client as well, then the user could use the plugin configuration for phoenix-core to set the settings.

Alternately, plugins can add their own configuration UI for setting the values. If a plugin does this, then I would urge the developer to use the APIs and not set the properties directory.

ie,
phoenix_fanart_SetIsFanartEnabled(true|false)
phoenix_fanart_SetFanartCentralFolder(Folder)

It is recommended to use the APIs since there can, in theory, be different fanart implementations, and different fanart implementations may not use the phoenix configuration properites to determine the central folder, etc.
Reply With Quote
  #11  
Old 01-17-2011, 12:55 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by stuckless View Post
I've tested this, since I don't have any clients, but I suspect that they are client settings. I think that if they client doesn't have them set, then it will pick up the server's value (which can be set from the web ui), but the client can override the setting.

Since phoenix core would be required on the client as well, then the user could use the plugin configuration for phoenix-core to set the settings.

Alternately, plugins can add their own configuration UI for setting the values. If a plugin does this, then I would urge the developer to use the APIs and not set the properties directory.

ie,
phoenix_fanart_SetIsFanartEnabled(true|false)
phoenix_fanart_SetFanartCentralFolder(Folder)

It is recommended to use the APIs since there can, in theory, be different fanart implementations, and different fanart implementations may not use the phoenix configuration properites to determine the central folder, etc.
At some point I'll set up a fresh client and test out exactly what happens on fresh setup...

I don't have phoenix core services installed on the client (but do on the server) so i dont think its required that the core services be installed on each client (at least fanart works on my setup without them installed, just the apis).

if i set up my own ui for enabling/disabling fanart on the client I'll use those apis, thanks

On more question is that if fanart is disabled on the server can it be enabled on the client? (I'll test that out too if you're not sure when i get around to setting up a fresh client.)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #12  
Old 01-17-2011, 01:23 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by razrsharpe View Post
At some point I'll set up a fresh client and test out exactly what happens on fresh setup...

I don't have phoenix core services installed on the client (but do on the server) so i dont think its required that the core services be installed on each client (at least fanart works on my setup without them installed, just the apis).

if i set up my own ui for enabling/disabling fanart on the client I'll use those apis, thanks

On more question is that if fanart is disabled on the server can it be enabled on the client? (I'll test that out too if you're not sure when i get around to setting up a fresh client.)
That's a good piont about the core services. Typically a client would not install that, since they would only need the phoenix api. So, I think your only option is to add your configuration panel to set the fanart folder.

If you disable the fanart on the server, then it may still work on the client, but I'm not sure how well it would work. BMT will only store fanart if fanart is enabled on the server.
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 API stuckless SageTV Customizations 264 03-17-2011 11:36 AM
Latest version of Phoenix API and SageMC tonysathre SageMC Custom Interface 3 12-30-2009 12:27 AM
Question about Updating Phoenix API craigap SageTV Customizations 1 08-25-2009 12:58 PM
Are the Phoenix API libraries required? mtenboer SageMC Custom Interface 5 05-10-2009 03:07 PM


All times are GMT -6. The time now is 02:00 PM.


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