Change/hide upload directory

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

Moderator: moderators

Change/hide upload directory

Postby dsync89 » Sat Oct 27, 2012 1:42 pm

Hi hakko, which source code should I modify if I wanted to change the default upload directory or hide it to prevent user from specifying the path? I would like all uploaded file to be consolidate to ONE single folder. So user should not be able to view or change the path.

My temporary workaround is just prevent user from changing the upload directory by adding the 'readonly' field. I try to remove the whole code below but the Upload button say no input.
Code: Select all
            <tr>
                <td><fmt:message key="more.upload.target"/></td>
                <td><input type="text" id="dir" name="dir" size="37" value="${model.uploadDirectory}" readonly="readonly"/></td>
                <td><input type="submit" value="<fmt:message key="more.upload.ok"/>"/></td>
            </tr>
musicScrape @ Music Cabinet Mod
http://musicscrape.zapto.org:8080
dsync89
 
Posts: 72
Joined: Fri Oct 19, 2012 8:51 am

Re: Change/hide upload directory

Postby dsync89 » Sat Oct 27, 2012 2:01 pm

Finally found a simple workaround, which is changing to type to hidden.

Code: Select all
<td><input type="hidden" id="dir" name="dir" size="37" value="${model.uploadDirectory}" readonly="readonly"/></td>
                <td><input type="submit" value="<fmt:message key="more.upload.ok"/>"/></td>
musicScrape @ Music Cabinet Mod
http://musicscrape.zapto.org:8080
dsync89
 
Posts: 72
Joined: Fri Oct 19, 2012 8:51 am

Re: Change/hide upload directory

Postby Pcace » Mon May 06, 2013 6:35 pm

Hey, which file do i have to edit, to get your little patch working?
i Tried to do this in /var/subsonic/jetty/0.7.24c/webapp/WEB-INF/jsp/more.jsp , but simply nothing happens, when i edit the more.jsp...
I also tried to edit line 61 to that:

<td><input type="text" id="dir" name="dir" readonly ="true" size="37" value="/media/medien/Musik/Automatisch_Einpflegen"/></td>


but after a restart of subsonic (/etc/init.d/subsonic restart) nothing happens...


Any Idea where i should put this code?


Thanks,

Pcace


PS: the strangest thing is, that i canged this before - maybe around one year ago -- and there is a Path setted per default: "/media/medien/Musik/Podcasts/Incoming" BUT this is the wrong path! And i do not have any clue why it is there. And i really cannot find any hint, where i typed this in! I also tried to find it via: "find . -type f -exec grep -qi "/media/medien/Musik/Podcasts/Incoming" {} \; -print". Still, i cannot find the file, where it is set! When i create a new user, it gets this path automaticly in the upload dilogue!
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby Pcace » Thu May 09, 2013 1:53 pm

Still no idea?

Any hint would be great!!!


Thanks,

Pcace
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby Pcace » Fri May 17, 2013 1:11 pm

Still no idea? I really would like to have a little hint there!!

Thanks!

Pcace
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby Pcace » Tue May 21, 2013 6:21 am

Hey, i just nearly read the whole forum through... and i really cannot find any solution for that.

has anyone just a little hint, where i could start my search?


THANKS!
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby Pcace » Thu Jun 27, 2013 7:09 am

Is there really no one who could help me with that?!

Sad....



Pcace
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby Pcace » Thu Jul 25, 2013 8:50 am

Strange!

maybe this Thread is simply not seen by others? Or does really no one can help me here?


Pcace
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby TNRocker » Fri Jul 26, 2013 1:27 am

I wish I could help you out but I don't know the answer. The developer appears to have taken a break and it doesn't appear many are willing to offer help.

I have posted several questions and never got a response. Music Cabinet is a fantastic Mod. There is one bug I would love to fix and the patch is on the github site but I am having trouble creating the .war file. See link below. Good luck!

viewtopic.php?f=11&t=12390
TNRocker
 
Posts: 60
Joined: Wed Jan 09, 2013 2:35 pm

Re: Change/hide upload directory

Postby thelin » Tue Aug 06, 2013 5:19 pm

I would also really like to know how to do this.
If anyone has any hints as to how to change and then hide the upload directory please let us know!

thanks!
9,794 artists
7,125 albums
76,285 songs
1300.01 GB
thelin
 
Posts: 9
Joined: Sun Mar 24, 2013 1:19 am

Re: Change/hide upload directory

Postby Pcace » Mon Oct 07, 2013 1:37 am

Still No one!?

Where is Hakko? I hope nothing bad happened to him! He is such an amazing guy!!!!


Thanks to everyone who has an idea!!!
Pcace
 
Posts: 117
Joined: Tue Nov 29, 2011 2:44 pm

Re: Change/hide upload directory

Postby beehlerj » Sat Dec 14, 2013 5:34 am

...jetty/3434/webapp/WEB-INF/jsp/more.jsp is the file that needs to be changed.
<tr>
<td><fmt:message key="more.upload.target"/></td>
<td><input type="text" id="dir" name="dir" size="37" value="${model.uploadDirectory}"/></td>
<td><input type="submit" value="<fmt:message key="more.upload.ok"/>"/></td>
</tr>
change to:
<tr>
<td><fmt:message key="more.upload.target"/></td>
<td><input type="hidden" id="dir" name="dir" size="37" value="${model.uploadDirectory}"/></td>
<td><input type="submit" value="<fmt:message key="more.upload.ok"/>"/></td>
</tr>
this hides the text from being changed
beehlerj
 
Posts: 7
Joined: Mon Feb 20, 2012 10:02 pm

Re: Change/hide upload directory

Postby gwynhfar » Sat Dec 14, 2013 10:21 am

Ok I found the answer somewhere in this forum. I wanted to change my upload directory wich was pointing in the middle of my collection.

I use the following sturcture MAIN/GENRE/ARTIST/ALBUM(S)/TRACK(S). 69 Genres, +4000 artists, + 17.000 albums, + 220.000 tracks. The Incoming folder was placed as a "main/incoming" folder, it always worked but after upgrading to 4.8 The Incoming folder was placed inside the first genre (main/genre1/incoming). To manually override these settings you have to find the "more.js".

subsonic\jetty\3434\webapp\WEB-INF\jsp\more.jsp Open the more jsp in your editor and find the part (in my case rule 140)

<td><fmt:message key="more.upload.target"/></td>
<td><input type="text" id="dir" name="dir" readonly ="true" size="37" value="${model.uploadDirectory}"/></td>

replace ${model.uploadDirectory} with the folder within your main music folder f.e. I:\ALL MUSIC\Incoming

<td><fmt:message key="more.upload.target"/></td>
<td><input type="text" id="dir" name="dir" readonly ="true" size="37" value=" I:\ALL MUSIC\Incoming"/></td>

Add the Incoming folder by setting it as a media folder (settings -> media folder new folder Incoming = I:\ALL MUSIC\Incoming)

Hope this will work for you, it worked for me ;)
gwynhfar
 
Posts: 12
Joined: Fri Mar 29, 2013 11:56 pm


Return to MusicCabinet

Who is online

Users browsing this forum: No registered users and 24 guests