How to modify Top Header and Artist Column

Artist radio, genre radio & related artists. A Subsonic server for music nerds.

Moderator: moderators

How to modify Top Header and Artist Column

Postby igbar » Sat Nov 17, 2012 5:29 am

I learned earlier today how to modify Subsonic to allow more room for the Artist/Album column to display.

I tried the same kind of thing with MusicCabinet and it did not work. Here is what I am seeing ..

subsonic-MusicCabinet-width.jpg


As you can see, first the 'header' does not have enough room to show the header correctly. Secondly, the Artist column is too small to display name correctly.

Are these changes possible?

Thanks .. really liking this so far

Igbar
igbar
 
Posts: 19
Joined: Fri Nov 16, 2012 6:06 pm

Re: How to modify Top Header and Artist Column

Postby hakko » Sat Nov 17, 2012 7:06 am

Edit index.jsp, just like you learned earlier.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: How to modify Top Header and Artist Column

Postby igbar » Sat Nov 17, 2012 3:18 pm

First, for the left hand 'artist' column

hakko wrote:Edit index.jsp, just like you learned earlier.

I have tried that. Did a search for index.jsp and found 2 .. but only 1 has the code looking for. It was \subsonic\hetty\0.7.14b\WEB-INF\index.jsp

I tried several changes with several settings and here is the last.
Code: Select all
<frameset rows="70,*,0 border="0" framespacing="0" frameborder="0">
    <frame name="upper" src="top.view?">
<!--
    <frameset cols="15%,85%" border="0" framespacing="0" frameborder="0">
-->
    <frameset cols="60%,40%" border="0" framespacing="0" frameborder="0">

As you can see I went way over (60/40) just to try and force a visual change and got nothing. It isn't a problem with browser cache as I even fired up explorer(which i never use) and it was the same ..
subsonic-width-explorer.jpg


Top Heading Frame size
I have not been able to figure out the setting for the top frame. I would have thought it was set with
Code: Select all
<frameset rows="70,*,0 border="0" framespacing="0" frameborder="0">

But no changes to that has any difference. I did notice an 'include file' in index.jsp and hoped that it was hiding there but it wasn't.

I apologize for my ignorance. I am not good at frames .. i am more of a table guy.

Using Firefox 16.0 generally but as mentioned also tried Explorer.

Any thoughts (other than I am a dunderhead) would be appreciated.

Thanks
Igbar
igbar
 
Posts: 19
Joined: Fri Nov 16, 2012 6:06 pm

Re: How to modify Top Header and Artist Column

Postby hakko » Sat Nov 17, 2012 4:50 pm

My bad, the .jsps are pre-compiled since a few versions back (to speed up browsing) but that means it takes a bit more work to change them on-the-fly.

(Ideally if you're modding this project, you should fork it on Github, alter the .jsp files, and then do "git pull" and build whenever new versions are released)

Anyway. The ugly way to (hopefully) make it work:

Find the find web.xml in jetty/<version>/webapp/WEB-INF/web.xml

Look for this part:
Code: Select all
    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.jsp.index_jsp</servlet-name>
        <url-pattern>/WEB-INF/jsp/index.jsp</url-pattern>
    </servlet-mapping>



Change it into
Code: Select all
<!--
    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.jsp.index_jsp</servlet-name>
        <url-pattern>/WEB-INF/jsp/index.jsp</url-pattern>
    </servlet-mapping>
-->


Alter the frame settings in index.jsp.

Restart your service.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: How to modify Top Header and Artist Column

Postby igbar » Sat Nov 17, 2012 5:39 pm

:oops: Thanks for that but I don't think it will be that easy ...

changed \subsonic\jetty\0.7.1.4b\webapp\WEB-INF\web.xml to this
<servlet-mapping>
<servlet-name>jsp.WEB_002dINF.jsp.home_jsp</servlet-name>
<url-pattern>/WEB-INF/jsp/home.jsp</url-pattern>
</servlet-mapping>
<!--
<servlet-mapping>
<servlet-name>jsp.WEB_002dINF.jsp.index_jsp</servlet-name>
<url-pattern>/WEB-INF/jsp/index.jsp</url-pattern>
</servlet-mapping>
-->
<servlet-mapping>
<servlet-name>jsp.WEB_002dINF.jsp.internetRadioSettings_jsp</servlet-name>
<url-pattern>/WEB-INF/jsp/internetRadioSettings.jsp</url-pattern>
</servlet-mapping>


I have attached a zip of the errors received. (zipped cause couldn't upload .htm or .txt). I did restored my changes to index.jsp to the original index.jsp and still get it :cry: When I revert the change above it works fine.

Guess I will just have to get used to it the way it is. I really didn't mean to take that much of your time. It must not be a worry as I haven't seen anyone else mention it.

Thanks for the help
Igbar
igbar
 
Posts: 19
Joined: Fri Nov 16, 2012 6:06 pm

Re: How to modify Top Header and Artist Column

Postby hakko » Sat Nov 17, 2012 5:48 pm

I don't see any attachment.. what went wrong? It doesn't have to be sorted out, but I tried it on my machine and it worked fine, so just curious why it didn't on yours.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: How to modify Top Header and Artist Column

Postby hakko » Sat Nov 17, 2012 5:52 pm

Ah, you have to install a JDK from java.com for this to work. The .jsp files are compiled into .class files but you don't have a java compilator (included in the JDK) on your machine. Sorry, didn't think about that, it's just one of my standard tools so I forget that everyone doesn't have it.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: How to modify Top Header and Artist Column

Postby igbar » Sun Nov 18, 2012 3:42 pm

Thanks for that .. I will give this a try after I get everything imported.

Edited: 08:08 PST - I will put the following in a 'enhancements' subject of their own. Igbar
Suggestions I would make for the scan/import process might be ..
    1) Maybe a process that 'loops' or restarts scan after a minute pause (or how ever long needed for last.fm)[/li]
    2) Maybe a 'refresh' every 10 seconds to the page[/li]
    3) You click refresh to see what the status is but it appears that after the 3000 limit is found it automatically goes back to the primary 'settings' page. You can't see what happend. or where you are[/li]
    4) have the refresh include some info on where you are .. how many left etc.[/li]

I know .. the import is a one time process (well except I just got 400+ prog cds from a friend and on completion of the original I will have to import those) so the 'pain' is not long felt .. just on large collections it can be frustrating not really knowing what is going on. But if this is the worst thing that happens to me then things are relatively good. :mrgreen:

Still thinking it is a great hack ..
Thanks
Igbar
igbar
 
Posts: 19
Joined: Fri Nov 16, 2012 6:06 pm

Re: How to modify Top Header and Artist Column

Postby hakko » Sun Nov 18, 2012 4:12 pm

I think you can point at pretty much any feature and say "this is not perfect" and I'll nod my head and agree and say it's not... but as a programmer, you sometimes have to strive for "good enough" rather than "perfect" to get something working out. For me personally, the import does its job silently every night, so I rather spend my time on this project right now adding new features that I'm missing.

But technically, you're right and if you feel like modifying the code to be more informative about the progress, just go ahead and supply a patch! There are some open issues on the same topic on Github (about making the progress more informative) that needs closing too...
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: How to modify Top Header and Artist Column

Postby igbar » Sun Nov 18, 2012 5:12 pm

Good .. it 'sounds' from your reply that you got my feeling right. No real complaints yet .. just wonderings.

I have written import/converstion tools in the past and they are anything but fun/fulfilling. And as you indicated there is always another stack of 'must do' that has to get attention .. and hey they are usually more fun :lol:

Thanks again for listening and answering.

Igbar
igbar
 
Posts: 19
Joined: Fri Nov 16, 2012 6:06 pm


Return to MusicCabinet

Who is online

Users browsing this forum: No registered users and 31 guests