[REQUEST] Fallback Info Labels

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
phil65 Offline
Skilled Skinner
Posts: 4,458
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #11
(2012-07-09 16:47)wyrm Wrote:  
(2012-07-09 14:54)Hitcher Wrote:  !IsEmpty(ListItem.Path,,/landscape.jpg) is never true because it's not checking if the file exists, it's just checking the label.

Fallback kicks in when an image isn't displayed.
Hitcher,

again, I might have missed exactly what you are chasing, but have you just tried setting the fallback to a blank image. Then you test for a blank image with the next image control. This is what I currently use.

PHP Code:
<control type="image" id="37016">
    <
posx>17</posx>
    <
posy>412</posy>
    <
width>184</width>
    <
height>50</height>
    <
texture fallback="blank.png">$INFO[ListItem.path]logo.png</texture>
    <
aligny>bottom</aligny>
    <
aspectratio align="left">keep</aspectratio>
</
control>
<
control type="image" id="39016">
    <
posx>17</posx>
    <
posy>412</posy>
    <
width>184</width>
    <
height>50</height>
    <
texture>$INFO[ListItem.path]../logo.png</texture>
    <
aligny>bottom</aligny>
    <
aspectratio align="left">keep</aspectratio>
    <
visible>!StringCompare(Control.GetLabel(37016),blank.png)</visible>
</
control
I use a variation of the above code for cleararts, logos, extrafanarts, etc. Only real downside is that it uses a stringcompare which can me a bit slow, but seems to work fast enough on my AppleTV.

Wyrm (xTV-SAF)

the stringcompare action itself isn´t slow, it´s the need to check the filesystem which makes it slow.
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,976
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #12
(2012-07-09 16:47)wyrm Wrote:  
(2012-07-09 14:54)Hitcher Wrote:  !IsEmpty(ListItem.Path,,/landscape.jpg) is never true because it's not checking if the file exists, it's just checking the label.

Fallback kicks in when an image isn't displayed.
Hitcher,

again, I might have missed exactly what you are chasing, but have you just tried setting the fallback to a blank image. Then you test for a blank image with the next image control. This is what I currently use.

PHP Code:
<control type="image" id="37016">
    <
posx>17</posx>
    <
posy>412</posy>
    <
width>184</width>
    <
height>50</height>
    <
texture fallback="blank.png">$INFO[ListItem.path]logo.png</texture>
    <
aligny>bottom</aligny>
    <
aspectratio align="left">keep</aspectratio>
</
control>
<
control type="image" id="39016">
    <
posx>17</posx>
    <
posy>412</posy>
    <
width>184</width>
    <
height>50</height>
    <
texture>$INFO[ListItem.path]../logo.png</texture>
    <
aligny>bottom</aligny>
    <
aspectratio align="left">keep</aspectratio>
    <
visible>!StringCompare(Control.GetLabel(37016),blank.png)</visible>
</
control
I use a variation of the above code for cleararts, logos, extrafanarts, etc. Only real downside is that it uses a stringcompare which can me a bit slow, but seems to work fast enough on my AppleTV.

Wyrm (xTV-SAF)
You can't give controls in a normal list IDs.

[Image: sig_zps3af3b48e.jpg]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,564
Joined: Oct 2003
Reputation: 138
Post: #13
The root cause here is the need to display other images. Now that the thumbcache stuff is done, this is now possible - it's something I've been meaning to bring up, as it will require a rescan of the video library.

In particular, I'm interested in getting a handle on:

1. What the scrapers can provide (eg thetvdb can supply posters, banners, and fanart for seasons + shows, whilst themoviedb.org seems to only have posters + fanart) - I'm sure the artwork databases can provide more. A starting list would be "fanart", "poster", "banner", plus whatever episode thumbs would fit into (I don't think we need to care about 4x3 vs 16x9 shots - it's one or the other normally). The trick here is we want the name to be descriptive of both aspect ratio and size, as the online art sources are normally pretty specific in this regard.

2. Exactly how we're going to handle things in the skin.

The first bit is getting the information into the database so that the database holds more descriptive information than just "fanart" and "thumb" (in particular, "thumb" needs to go away ideally). Note that I don't see any point handling anything arbitrary at this point, and you the skinner need to have a finite list of possibilities anyway.

Once this is done, we need to decide how to handle falling back to other images, should the one we want not be available in the listitem. So basically you'll get something like ListItem.Art(poster). If a poster image is available it'll be returned. What to do if a poster image is not available? Is it best for XBMC to automatically fallback like ListItem.Icon does (eg fallback to ListItem.Thumb), or is it better for it to just return blank so that you the skinner can select the next one you wish to use for that view?

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
pecinko Offline
Member+
Posts: 3,067
Joined: Dec 2008
Reputation: 29
Location: Prague / Belgrade
Post: #14
In what way would be handled stuff like (my favourite) parent folder icons. We can supply fallbacks for arts (now called thumbs) but it probably won't play nicely with system items (now called icons).

My skins:

Quartz
Amber
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,976
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #15
(2012-07-09 23:46)jmarshall Wrote:  The root cause here is the need to display other images. Now that the thumbcache stuff is done, this is now possible - it's something I've been meaning to bring up, as it will require a rescan of the video library.

In particular, I'm interested in getting a handle on:

1. What the scrapers can provide (eg thetvdb can supply posters, banners, and fanart for seasons + shows, whilst themoviedb.org seems to only have posters + fanart) - I'm sure the artwork databases can provide more. A starting list would be "fanart", "poster", "banner", plus whatever episode thumbs would fit into (I don't think we need to care about 4x3 vs 16x9 shots - it's one or the other normally). The trick here is we want the name to be descriptive of both aspect ratio and size, as the online art sources are normally pretty specific in this regard.

2. Exactly how we're going to handle things in the skin.

The first bit is getting the information into the database so that the database holds more descriptive information than just "fanart" and "thumb" (in particular, "thumb" needs to go away ideally). Note that I don't see any point handling anything arbitrary at this point, and you the skinner need to have a finite list of possibilities anyway.

Once this is done, we need to decide how to handle falling back to other images, should the one we want not be available in the listitem. So basically you'll get something like ListItem.Art(poster). If a poster image is available it'll be returned. What to do if a poster image is not available? Is it best for XBMC to automatically fallback like ListItem.Icon does (eg fallback to ListItem.Thumb), or is it better for it to just return blank so that you the skinner can select the next one you wish to use for that view?

Cheers,
Jonathan

I didn't realise things had progressed as much as this, feel free to lock this thread and start another discussion if you want to get more attention on the proposals.

EDIT: I will add that 'landscape' is also a widely used image that is, if you're not already aware, a 16x9 image containing a TV shows title. As for fallback images I think XBMC should behave as it does now as we can simply use a variable if we want fallback to something else (eg landscape to fanart).

[Image: sig_zps3af3b48e.jpg]
(This post was last modified: 2012-07-10 01:06 by Hitcher.)
find quote
nessus Offline
Skilled Skinner
Posts: 625
Joined: Apr 2009
Reputation: 12
Location: Rodos, Greece
Post: #16
Just before i was ready to bump about this in Skin & UI Suggestions for Frodo thread, i saw this thread.

IMHO the list of the supporting images in order of importance is....
1. Fanart - fanart.jpg (All)
2. Poster - poster.jpg (Movies & TV Shows)
3. Banner - banner.jpg (TV Shows)
4. Logo - logo.png (TV Shows)
5. Landscape - landscape.jpg (TV Shows)
6. ClearArt - clearart.png (TV Shows)
7. Logo - logo.png (Movies)
8. Logo - logo.png (Artists)

... but the most important future for now is to separate banners and posters in TV Shows. It will resolve many misunderstandings from the users and it will save a lot of time for skinners. As for the fallback thing i agree with Hitcher.

Cheers
Nessus
(This post was last modified: 2012-07-11 09:19 by nessus.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,564
Joined: Oct 2003
Reputation: 138
Post: #17
See here for further discussion: http://forum.xbmc.org/showthread.php?tid=136134

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Post Reply