Page 1 of 1

No music found message in empty folder

PostPosted: Thu Apr 26, 2012 10:05 am
by fanSte
Hi!!

I have several music folders in my Subsonic. Some of them are empty. When I open the empty folder in Subsonic, it just shows a blank page (only folder location name is visible).

Is it possible, when a user opens an empty folder, he gets a message like: No music found in this folder.

Thanks!

fanSte.

Re: No music found message in empty folder

PostPosted: Thu Apr 26, 2012 10:18 am
by hakko
Based on your previous proofs of skills, it's probably enough to tell you to go look in jetty/[[[BUILD_NUMBER]]]/webapp/WEB-INF/jsp/left.jsp

Re: No music found message in empty folder

PostPosted: Thu Apr 26, 2012 12:26 pm
by fanSte
yes, I know now which file I have to edit, but I don't know which line and howto, xD

I know how to change lines, but I don't have any programming skills.

Re: No music found message in empty folder

PostPosted: Thu Apr 26, 2012 12:45 pm
by hakko
Ok you should start programming, it's so much fun!

in left.jsp, right before the line

Code: Select all
<c:forEach items="${model.indexedArtists}" var="entry">


try adding this block:

Code: Select all
<c:if test="${empty model.indexedArtists}">
   <p>No music found in folder!</p>
</c:if>

Re: No music found message in empty folder

PostPosted: Fri Apr 27, 2012 6:36 am
by fanSte
Hi!

Thank you for your reply.

I have tried it like you said, but without any luck. It still show no message.

fanSte.

Re: No music found message in empty folder

PostPosted: Fri Apr 27, 2012 6:50 am
by hakko
Hmm.. really? I tried it at my end, adding a completely empty folder and it gave that message. Maybe I missed something. Could you right-click in the left column and choose reload, just to make sure it's not cached? Do you have something inside the folder where you want that message to appear, like video files or something?

Re: No music found message in empty folder

PostPosted: Fri Apr 27, 2012 7:08 am
by fanSte
I've hard-refresh my browser and even tried another one. The folder don't have any files.

Here is a screenshot:

Image

Re: No music found message in empty folder

PostPosted: Fri Apr 27, 2012 7:14 am
by hakko
Ah sorry I misunderstood. The code I pasted works for the left column, if you have a setup with multiple music folders and one lacks music files. This needs another piece of code. Sorry again for the confusion.

Re: No music found message in empty folder

PostPosted: Fri Apr 27, 2012 7:30 am
by fanSte
aha, I'll wait till someone know how to do this with multiple folders then.

Thanks for the help anyway, xD