Andrew-McGee / foam

A Fomantic UI styled web music player frontend for Ampache. Designed to be minimal, tidy and usable.
GNU General Public License v3.0
17 stars 2 forks source link

add host to config/foam.conf.php? #13

Closed lachlan-00 closed 1 month ago

lachlan-00 commented 1 year ago

I've moved the hosting for demo (https://demo.ampache.dev/foam/) and develop (https://develop.ampache.dev/foam/) and i've put in the default demo details in auth.php image

I know it's simple to do to auth. but could that be added into the conf file?

Andrew-McGee commented 1 year ago

Hey mate - good to hear from you. Apologies I haven't been super responsive - work is crazy. But I am still chipping away here.

Yes good idea I can default credentials into the conf file. I have a todo item to fix this whole login screen so can include that too.

Andrew-McGee commented 1 year ago

I noticed something weird on your demo. The Supamix button doesn;t work. If you use my demo page and connect to your same ampache host it works fine: http://foamdemo.mcgee.technology/

Maybe there is a difference in PHP settings. It could time out - supamix takes a few seconds to randomly build 100 songs from multiple albums.

Andrew-McGee commented 1 year ago

Added to the conf file - you can populate or leave blank and it caters for both scenarios.

// Default login information that will be populated on the login form // If left blank then fields will be unpopulated except for placeholder hints $defHost = ''; // Eg. http://myhost.com or myampachehost.com or IP equivalent. Can include port number. $defUser = ''; // Eg. The Ampache username to default $defPass = ''; // Eg. The Ampache password to default use (WARN: this leaves it wide open for anyone to login)

lachlan-00 commented 1 year ago

i get a php error for supamix

[Mon Oct 31 20:26:51.762894 2022] [proxy_fcgi:error] [pid 1269354:tid 140678996842240] [client 58.84.188.56:40344] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "song" in /var/www/demo/demo.ampache.dev/public/foam/supamix_tracks.php:18\nStack trace:\n#0 {main}\n  thrown in /var/www/demo/demo.ampache.dev/public/foam/supamix_tracks.php on line 18', referer: https://demo.ampache.dev/foam/albums_view.php

Haven't looked at the php file yet but i'll see what i can see in the morning.

lachlan-00 commented 1 year ago

I've been migrating the api5 out to a separate subclass for api6 so the error is likely me. had to make a few changes to fix things i'm getting session expired for those calls so need to work out what is going on image

Andrew-McGee commented 1 year ago

Yep the undefined constant is an array that doesn't have quotes. I tried fixing some other bits with it and completely borked it tonight so I will have to wait until later in the week to fix.

It doesn't die for me on PHP 7 but 8 will crash.

Andrew-McGee commented 1 month ago

Supamix working. All arrays updated for PHP 8+ syntax. Temp fix using ampache API version=5.6.0 for auth issues.