I decided that since I never use the star ratings, and because the album title is often too long to fit in the now playing screen, I'd add a line with the year and bitrate (since I constantly find myself looking for that piece of info).
In order to add this line, I did the following in NowPlaying.m:
changed
Global GuiObject line1, line2, line3, BGCol, CDBoxFade;
to
Global GuiObject line0, line1, line2, line3, BGCol, CDBoxFade;
added
line0 = XUIGroup.findObject("sc.nowplaying.line0");
changed
String year = System.getPlayItemMetaDataString("YEAR");
String album = System.getPlayItemMetaDataString("ALBUM");
if(year=="????") year="";
if (strLen(year)<4) year="";
else year= " (" +year +")";
line1.setXmlParam("text", album +year);
to
String year = System.getPlayItemMetaDataString("YEAR");
String album = System.getPlayItemMetaDataString("ALBUM");
String rate = System.getPlayItemMetaDataString("BITRATE");
if(year=="????") year="";
if (strLen(year)<4) year="";
else year= "Year: " +year +", ";
if(strLen(rate)>0) rate= "Bitrate: " +rate;
line1.setXmlParam("text", album);
line0.setXmlParam("text", year +rate);
Then, in NowPlaying.xml, I added a line to change the 3 lines here
<SC:FadeText id="sc.nowplaying.line3" x="0" y="-2" w="0" h="42" relatw="1" fgcolor="255,255,255" align="center" fontsize="42" alpha="255"/>
<SC:FadeText id="sc.nowplaying.line2" x="0" y="38" w="0" h="32" relatw="1" fgcolor="255,255,255" align="center" fontsize="34" alpha="255"/>
<SC:FadeText id="sc.nowplaying.line1" x="0" y="70" w="0" h="32" relatw="1" fgcolor="255,255,255" align="center" fontsize="34" alpha="255"/>
to these 4
<SC:FadeText id="sc.nowplaying.line3" x="0" y="-2" w="0" h="42" relatw="1" fgcolor="255,255,255" align="center" fontsize="42" alpha="255"/>
<SC:FadeText id="sc.nowplaying.line2" x="0" y="38" w="0" h="32" relatw="1" fgcolor="255,255,255" align="center" fontsize="34" alpha="255"/>
<SC:FadeText id="sc.nowplaying.line1" x="0" y="70" w="0" h="32" relatw="1" fgcolor="255,255,255" align="center" fontsize="34" alpha="255"/>
<SC:FadeText id="sc.nowplaying.line0" x="0" y="100" w="0" h="32" relatw="1" fgcolor="255,255,255" align="center" fontsize="34" alpha="255"/>
I also commented out this line to get rid of the star ratings
<!--<group id="sc.nowplaying.ratings" x="0" y="110" w="78" h="14"/>-->
The problem that I'm having is that when the skin is loaded (either when Winamp starts up, when I refresh the skin, or when I switch from another skin to this one), I get an error message that says something about a null reference in NowPlaying.maki.
Once I left click, the error box message disappears and the skin seems to load up fine. On my laptop, everything is stable, and I can live with the error message, since I usually just hibernate it and never close winamp.
On my desktop, however, winamp has become completely unstable with these three new altered files (NowPlaying.xml, NowPlaying.maki, NowPlaying.m). It crashes constantly. If I replace those three files with the three that I had before trying to add the year/bitrate line, everything works fine.
Anyone know what could be causing that error message? I have a feeling it's got something to do with
line0 = XUIGroup.findObject("sc.nowplaying.line0");
Is sc.nowplaying defined somewhere? If so, I think I'd have to add the "line0" attribute.
Here are links to the 3 files, if anyone wants to take a look.
NowPlaying.xml
NowPlaying.m
NowPlaying.maki