No music found message in empty folder

Need help? Post your questions here.

Moderator: moderators

No music found message in empty folder

Postby fanSte » Thu Apr 26, 2012 10:05 am

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.
fanSte
 
Posts: 9
Joined: Sat Nov 26, 2011 11:15 pm

Re: No music found message in empty folder

Postby hakko » Thu Apr 26, 2012 10:18 am

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
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: No music found message in empty folder

Postby fanSte » Thu Apr 26, 2012 12:26 pm

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.
fanSte
 
Posts: 9
Joined: Sat Nov 26, 2011 11:15 pm

Re: No music found message in empty folder

Postby hakko » Thu Apr 26, 2012 12:45 pm

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>
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: No music found message in empty folder

Postby fanSte » Fri Apr 27, 2012 6:36 am

Hi!

Thank you for your reply.

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

fanSte.
fanSte
 
Posts: 9
Joined: Sat Nov 26, 2011 11:15 pm

Re: No music found message in empty folder

Postby hakko » Fri Apr 27, 2012 6:50 am

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?
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: No music found message in empty folder

Postby fanSte » Fri Apr 27, 2012 7:08 am

I've hard-refresh my browser and even tried another one. The folder don't have any files.

Here is a screenshot:

Image
fanSte
 
Posts: 9
Joined: Sat Nov 26, 2011 11:15 pm

Re: No music found message in empty folder

Postby hakko » Fri Apr 27, 2012 7:14 am

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.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: No music found message in empty folder

Postby fanSte » Fri Apr 27, 2012 7:30 am

aha, I'll wait till someone know how to do this with multiple folders then.

Thanks for the help anyway, xD
fanSte
 
Posts: 9
Joined: Sat Nov 26, 2011 11:15 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 22 guests