mitchray / ample

A simple web browser client for Ampache
https://ample-player.vercel.app/
GNU Affero General Public License v3.0
61 stars 13 forks source link

Different install location #42

Closed B4T3S closed 1 year ago

B4T3S commented 1 year ago

Is it possible to use Ample from a different install location than Ampache? I'd like to be able to have a separate subdomain for both of them, which would be easy to accomplish with 2 different virtual hosts (running apache). But ample becomes entirely unresponsive when it's not in ampache/public.

I did try to build from source (with the root folder set to "/" and the server address specified) but still no luck. I also tried to just make the ampache/public folder a separate virtual host but got the same unresponsiveness as before.

mitchray commented 1 year ago

Not possible sorry, it relies on /ample in the URL to get the Ampache server URL without having to use a config file

B4T3S commented 1 year ago

Gotcha. Thanks for the quick reply ^^

Out of curiosity, would it theoretically be possible if I forked the project/created a branch to implement it myself or is it just a technical limitation that would require too much of a rewrite to work?

mitchray commented 1 year ago

Yeah potentially, I think its only these parts

Router path https://github.com/mitchray/ample/blob/05682cf89d7c528887b1eea7d084d6d15be6a4e5/src/App.svelte#L92

Server path https://github.com/mitchray/ample/blob/05682cf89d7c528887b1eea7d084d6d15be6a4e5/src/stores/server.js#L6-L8

Vite path https://github.com/mitchray/ample/blob/c81158fd598be37ea0a9295e941a58571647d8b6/vite.config.js#L7

B4T3S commented 1 year ago

Nice! I'll try getting it set up after work tomorrow then ^^

Thank you very much for the help and the pointers! :)

B4T3S commented 1 year ago

Just created a pull request with my changes, in case you want to give other people the option to use remote servers as well. (That is assuming what I just pushed isn't too horrible lol)

mitchray commented 1 year ago

Glad you got it working! I'll review it when I get the chance