Help with disabling some features

Need help? Post your questions here.
uploadsucks
Posts: 6
Joined: 10 Feb 2013, 07:23
Has thanked: 0
Been thanked: 0

Help with disabling some features

Unread post by uploadsucks »

I have a couple of gripes with Madsonic at the moment:
  • Is there a way to disable the similar artists feature in the sidebar? It's talking up a lot of space in the side panel for chat.
    I would like to disable the youtube buttons
    The upload feature: Is there a way to make the upload location editable?
That's pretty much it. This is loads better than subsonic! My friends and I really dig it so far, thanks in advance for any help.
boxmonkey
Posts: 1
Joined: 24 Dec 2012, 03:43
Has thanked: 0
Been thanked: 1 time

Re: Help with disabling some features

Unread post by boxmonkey »

I ran into an issue today with simlar_artists/upload and since this is the only post i could find related to this I figured I'd throw my solution in. I apologize if this is rehashing an old thread. Also, not sure if my fix is the "correct" way to do it but it works for me. If anyone has any suggestions for this please let me know.

I recently moved madsonic into a tomcat installation on linux and wanted to use SSL. I got it all configured and working but I soon noticed that when I started playing a song, the browser would suddenly report that the page had insecure elements. In firefox it would report as the site is only "partially encrypted" and chrome would show it as encrypted but that it was blocking an unsecure script, once I allowed the script it went to partially encrypted.

After some analysis I was able to determine that this was being caused by the similar_artists search making an unsecured http call out to get the artist information. Everything still worked but being the nut that I am this was not acceptable to me. I really like the now playing and chat feature but I NEVER use the similar artists search so I decided it needed to go.

I managed to "disable" it by finding the references to the script used in the site code and removing them. Below is how I did it.

!!We will be editing site files for subsonic so i HIGHLY recommend backing up the files before making any of the changes below!!


From what i found, the script that drives this is located in the <subsonic>/webapps/scripts/similar_artists/similar_artists.js

1. navigate to your <subsonic>/WEB_INF/jsp directory of your subsonic install
- This will vary depending on how subsonic is installed and on what system. You may want to search for the two jsp files to find their true location. I found mine under the tomcat webapps directory (/usr/share/tomcat7/webapps/<subsonic war name>/WEB_INF/jsp). In standard install i believe it may be under the subsonic/jetty/webapps directory but i could be wrong.

2. I found two references to the /scripts/similar_artists/similar_artists.js file in the subsonic WEB_INF/jsp/ directory:
chat.jsp
right.jsp

Edit BOTH of these files and comment out or remove this line:

Code: Select all

                <script type="text/javascript" src="<c:url value="/script/similar_artists/similar_artists.js"/>"></script>
3. Save each file after removing the line and restart subsonic.

If all goes well, the nowplaying/chat window wont display the similar artists search, or even make the call out for the data.


I also had to do something similar to edit the default upload directory

1. In the same directory as above, backup and then edit the moree.jsp file
2. find the line:

Code: Select all

                <td><input type="text" id="dir" readonly="readonly" name="dir" size="37" value="${model.uploadDirectory}\Upload-${model.user.username}"/></td>
3. edit the value tag to point at your default upload directory.

4.If you want users to be able to edit that line in the window, remove this tag from the line:

Code: Select all

readonly="readonly"
Example:

Code: Select all

<td><input type="text" id="dir" name="dir" size="37" value="<default upload directory>"/></td>
5. Example, I want my uploads going to the folder /media/Incoming/<username> on my server, so I made mine look like this:

Code: Select all

                <td><input type="text" id="dir" readonly="readonly" name="dir" size="37" value="/media/Incoming/${model.user.username}"/></td>

6. save and restart subsonic

I have never disabled the youtube buttons so I'm not sure how that is accomplished.


again.. DO THIS AT YOUR OWN RISK! I recognize this changing the code not a pretty way of doing this but it worked for me. Note that if you update subsonic, these files will get overwritten and your changes will be lost.

I can't stress enough to backup the files before you edit, that way, if anything goes wrong, just copy the backups over the edited files and restart the server. This should put things back to default.

Also, since this is my first post I'd like to thank the madsonic team for an awesome mod!
These users thanked the author boxmonkey for the post:
Madsonic
Rating: 7.69%
Post Reply