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

Any chance this could be transplanted to nextcloud music? #26

Closed xinstein closed 2 years ago

xinstein commented 2 years ago

I understand that this has to be installed alongside ampache server. But it seems the only coherence with the ampache server is the serverURL in stores/server (correct me if I'm wrong).

Nextcloud on the other hand also uses php and there's the music app which provides both ampache and subsonic interface, as well as a not-so-satisfactory webui.

I'm thinking if this could be installed standalone and the serverURL be made configurable, it might just work well with nextcloud music.

Is this doable?

Jieiku commented 2 years ago

I have no idea about the answer to your question, but incase it helps, here is how I install ample:

cd /var/www/ampache/public
sudo rm -rf ample*
curl -s https://api.github.com/repos/mitchray/ample/releases/latest | grep "browser_download_url.*ample_.*zip" | cut -d : -f 2,3 | tr -d \" | sudo wget -i -
sudo unzip ample_*
sudo rm ample_*
sudo sed -i 's/border-radius:50\%/border-radius:9px/' /var/www/ampache/public/ample/public/build/bundle.css
sudo chown -R www-data:www-data /var/www/ampache
mitchray commented 2 years ago

Hey, Ample is designed as a drop-in companion client for an Ampache server specifically, so my assumption is it wouldn't work

If Nextcloud/music has support for the entire Ampache API, including things like user_preferences then maybe... though I'm guessing it would just be more general artists/albums/songs

If you're interested and able to test it, override the server URL and see what happens

xinstein commented 2 years ago

I tried it, here's my Dockerfile:


FROM php:8-apache

RUN apt-get update ;
RUN apt-get install -y git ;
RUN cd /var/www/html/; \
    git clone https://github.com/mitchray/ample.git ; 

RUN apt-get remove --purge -y git; \
    apt-get autoremove --purge -y;

RUN a2enmod rewrite ;

##### clear cache
RUN rm -rf /var/lib/apt/lists/* ;

Then I open https://mydomain:myport/ample/index.php (the protocol and the domain and port are my reverse proxy):


- 
mitchray commented 2 years ago

I'm going to say it isn't feasible to support anything other than a standard Ampache server

paulijar commented 1 year ago

Sorry to necro-post, but as the developer of Nextcloud Music, I find this topic interesting. I'm currently in the process of adding support for Ampache API versions 5 and 6 to Nextcloud Music. While doing that, I'd like to make it compatible also with Ample.

I actually already have a partially compatible version on my work area, where some of the views of Ample work fine. But to make it complete, some significant effort is still needed. The most important missing piece is the advanced_search which is used heavily on Ample but not yet supported on Nextcloud Music. Before this, I haven't seen any client using this part of the API, and hence I have opted not to invest time and effort on it.

mitchray commented 1 year ago

Interesting to learn you were able to get it at least partially working with Ample 👍

Keep me posted if/when you add advanced_search support

paulijar commented 11 months ago

The Nextcloud/ownCloud Music v1.9.1 was released a couple of days ago and it works rather nicely together with Ample.

There are a few limitations, though:

  1. It's possible to set up Nextcloud or ownCloud server to use either MySQL/MariaDB, PostgreSQL, or SQLite as the DB backend. Out of these, SQLite does not have native support for regular expressions, and hence, the Ampache advanced search with regex pattern will not work on installations using SQLite. In addition to being available in the Advanced search view, Ample uses regex searches under the hood in a few places and these features will not work with SQLite.

  2. The advanced search rules "sounds like" and "doesn't sound like" work only with MySQL/MariaDB.

  3. In the advanced search view, majority of the available rules are supported but some are not.

  4. The format used for the method user_preference is that of Ampache 6.0.1 or later. Hence, the view using this method does not work on the latest Ample release 2.0.2 but I can see that there is already on unreleased API update in this repository. Edit: This is fixed in Ample 2.0.3

paulijar commented 5 months ago

Update: Nextcloud Music v1.11.0 now fixes the DB-type limitations mentioned above. That is, the regexp searches now work fine also on SQLite, and "sounds like"-type of searches work also on SQLite and PostgreSQL. On the latter, this requires installing the extension fuzzystrmatch, though. Also, quite a few bugs were fixed from various cases of the advanced search.