Kodi Community Forum

Full Version: DefaultAlbumCover.Png Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi @jjd-uk 
I installed the Shoutcast radio addon a few days ago and noticed that when I press OK for the OSD, I'm getting a default icon appearing which I would like to either disable or replace on my own skin mod.
The problem I'm having is finding the exact line item that tells estuary to show this icon. I thought it was probably the fallback image mentioned for the album cover on the MusicVisualisation.xml. However, when I remove the fallback, the same icon still appears when I start playback of a shoutcast radio channel.
The same icon appears to also be called DefaultMusicAlbums.png and DefaultMusicTop100Albums, but I haven't been able to find any trace of these being specified to show on either OSD or Info Panel.
Even when I removed the Player.ShowInfo condition mentioned for the album cover control item it still appears.
Any ideas or hints where else I could look?
You're right, it doesn't come from the fallback in

<texture fallback="DefaultAlbumCover.png" border="2">$INFO[MusicPlayer.Cover]</texture>

as if I change to

<texture fallback="DefaultAudio.png" border="2">$INFO[MusicPlayer.Cover]</texture>

there's no change.

So it must be coming from $INFO[MusicPlayer.Cover] in which case I guess it's the addon setting MusicPlayer.Cover = DefaultAlbumCover.png

For debugging images add the the infolabel as label for you can see what value is returned by the infolabel. So in this case I added the below to before the image control for the cover

			<control type="label">
<visible>[Player.ShowInfo | Window.IsActive(musicosd)] + !MusicPlayer.Content(livetv)</visible>

Which gives


So this proves that $INFO[MusicPlayer.Cover] is returning DefaultAlbumCover.png in which case I tjhink this proves it must be the addon setting the infolabel to this, so I guess the addon has it's own fallback if there's no cover.

So you need overide this in the skin.

You can do this by changing $INFO[MusicPlayer.Cover] to a Variable for image control in MusicVisualisation.xml

			<control type="image">
<visible>[Player.ShowInfo | Window.IsActive(musicosd)] + !MusicPlayer.Content(livetv)</visible>
<aspectratio aligny="bottom">keep</aspectratio>
<texture border="2">$VAR[MusicPlayerCoverVar]</texture>
<bordertexture colordiffuse="border_alpha">colors/black.png</bordertexture>

Then add Variable

	<variable name="MusicPlayerCoverVar">
<value condition="String.IsEqual(MusicPlayer.Cover,DefaultAlbumCover.png)">DefaultAudio.png</value>

So whenever $INFO[MusicPlayer.Cover] has a value of DefaultAlbumCover.png then DefaultAudio.png is used, for everything else fallback to $INFO[MusicPlayer.Cover]


Btw the very nice Estuary mod you've done, I've also been working on my own mod for quite some time but it's almost turning into a rewrite of Estuary in places so taking me a lot of time.
Hi @jjd-uk 
Outstanding! Thanks so much for your assistance.
I spent nearly an hour scanning everywhere I could think of trying to track down the exact issue. I even looked at every file included on the shoutcast addon, thinking the issue might be coming from there and not the skin. The real issue was the fact I offer users the option to display discart and fake discs, so DefaultAlbumCover.png being transparent was going to a problem if the discart option was enabled. As afterthought I did think I could have got around it by creating a new DefaultAlbumCover.png with a solid background, but that might have caused other issues elsewhere within the skin. Plus I wasn't keen to introduce a bit of hack without fully understanding what was actually causing the issue, hence why I thought I'd ask the question.

After following your guidance, everything is now working great and as expected:-

Thanks for the very kind words about my own mod. Originally, the intention was just to make some cosmetic layout changes on the PVR side, but things then evolved into changing the OSD and info panels as well. Unfortunately, the original OSD layout had some some issues with opening and closing different dialogs, so have recently opted to align these layouts more to the look of the default Estuary skin, but still trying to put my own stamp on things as well. I feel fairly pleased with the overall look and feel, whilst trying to keep the skin size down as well.

Oh, I can completely believe that your own mod has turned into a rewrite on some aspects. Have been in the same position in the past where a small idea suddenly escalates into some monumental monster.
Anyway, many thanks for kind help. It was very much appreciated.
So by pure luck I picked a image with no transparency for my experiments which suited your needs 😃 The main trick I wanted to convey is that when debugging you can use a label control to display what any infolabel returns so you can be 100% sure what it's doing in any circumstance.