Page 1 of 1

Iterating artist name also on left column?

PostPosted: Thu Aug 23, 2012 9:54 pm
by ZonOfthor
Hi,
I am trying to add artist name to the left column so that it displays "Artist - SongName" instead of just SongName..

Editing left.jsp so that

Code: Select all
<c:import url="playAddDownload.jsp">
<c:param name="path" value="${song.path}"/>
<c:param name="playEnabled" value="${model.user.streamRole and not model.partyMode}"/>
<c:param name="addEnabled" value="${model.user.streamRole}"/>
</c:import>
${song.artist}
</p>
</c:forEach>


becomes

Code: Select all
<c:import url="playAddDownload.jsp">
<c:param name="path" value="${song.path}"/>
<c:param name="playEnabled" value="${model.user.streamRole and not model.partyMode}"/>
<c:param name="addEnabled" value="${model.user.streamRole}"/>
</c:import>
${song.artist} - ${song.title}
</p>
</c:forEach>



But doing that reverts to original version... I haven't found any API to describe the song object parameters but surely there must be a .artist property?

Re: Iterating artist name also on left column?

PostPosted: Fri Sep 28, 2012 7:57 pm
by ZonOfthor
I'd like to bump since this is my one main issue I cannot find out how to fix (mod)?

So easy to change the left.jsp file but I just don't know what database field to use?

Re: Iterating artist name also on left column?

PostPosted: Fri Sep 28, 2012 9:27 pm
by ZonOfthor
Well, it turns out in 4.7 this works perfectly

Code: Select all
<div class="SingleSongs">
<c:forEach items="${model.singleSongs}" var="song">
<p>
<c:import url="playAddDownload.jsp">
<c:param name="id" value="${song.id}"/>
<c:param name="playEnabled" value="${model.user.streamRole and not model.partyMode}"/>
<c:param name="addEnabled" value="${model.user.streamRole}"/>
<c:param name="video" value="${song.video and model.player.web}"/>
</c:import>
[b]${song.artist} - ${song.title}[/b]
</p>
</c:forEach>
</div>



BUT... how can I make the artist/song entries be sorted alphabetically?