Page 1 of 1

Change/hide upload directory

PostPosted: Sat Oct 27, 2012 1:42 pm
by dsync89
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>

Re: Change/hide upload directory

PostPosted: Sat Oct 27, 2012 2:01 pm
by dsync89
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>

Re: Change/hide upload directory

PostPosted: Mon May 06, 2013 6:35 pm
by Pcace
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!

Re: Change/hide upload directory

PostPosted: Thu May 09, 2013 1:53 pm
by Pcace
Still no idea?

Any hint would be great!!!


Thanks,

Pcace

Re: Change/hide upload directory

PostPosted: Fri May 17, 2013 1:11 pm
by Pcace
Still no idea? I really would like to have a little hint there!!

Thanks!

Pcace

Re: Change/hide upload directory

PostPosted: Tue May 21, 2013 6:21 am
by Pcace
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!

Re: Change/hide upload directory

PostPosted: Thu Jun 27, 2013 7:09 am
by Pcace
Is there really no one who could help me with that?!

Sad....



Pcace

Re: Change/hide upload directory

PostPosted: Thu Jul 25, 2013 8:50 am
by Pcace
Strange!

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


Pcace

Re: Change/hide upload directory

PostPosted: Fri Jul 26, 2013 1:27 am
by TNRocker
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

Re: Change/hide upload directory

PostPosted: Tue Aug 06, 2013 5:19 pm
by thelin
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!

Re: Change/hide upload directory

PostPosted: Mon Oct 07, 2013 1:37 am
by Pcace
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!!!

Re: Change/hide upload directory

PostPosted: Sat Dec 14, 2013 5:34 am
by beehlerj
...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

Re: Change/hide upload directory

PostPosted: Sat Dec 14, 2013 10:21 am
by gwynhfar
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 ;)