From 45cdb90484233d489482a9fc768d7512ed87fa56 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 27 Mar 2026 14:37:34 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 12 ++++---- scripts/lib/squeezebox.php | 53 ----------------------------------- scripts/spotifychecklogin.php | 3 -- scripts/squeeze.php | 5 ---- 4 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 scripts/spotifychecklogin.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 17deab4..b2ca7b9 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,11 +5,9 @@ - - - - - + + + diff --git a/scripts/lib/squeezebox.php b/scripts/lib/squeezebox.php index d900db9..d31d967 100644 --- a/scripts/lib/squeezebox.php +++ b/scripts/lib/squeezebox.php @@ -292,57 +292,4 @@ function getSqueezeFavorites($root = 0, $app = 'favorites', $level = 0) return $res; -} - -function checkSpottyLogin($force = false) -{ - $spottybase = '/plugins/Spotty/settings/'; - $hascredentials = httpRequest(SQUEEZEBOX_SERVER . $spottybase . 'basic.html?_dc=' . time(), 'get', [], null, 10, false); - - $accounts = [ - //SQUEEZEBOX_SPOTIFY_USERNAME => SQUEEZEBOX_SPOTIFY_PASSWORD, - 'v12l' => 'UZfARnm9oFcoz%fZDg', - //'jrme75009' => 'tortuga5009', - ]; - - if ($force) { - $loggedIn = false; - } else { - $loggedIn = $hascredentials->getStatusCode() !== 302; - if ($loggedIn) { - $resp = $hascredentials->getBody(); - foreach ($accounts as $user => $password) { - if (!stristr($resp, $user)) { - $loggedIn = false; - break; - } - } - } - } - - if (!$loggedIn) { - global $squeezeboxPlayers; - echo 'Not logged in !
'; - $player = $squeezeboxPlayers['Cuisine']; - - - foreach ($accounts as $user => $password) { - echo 'Log in to Spotify with username ' . $user . "\n"; - $res = httpRequest(SQUEEZEBOX_SERVER . $spottybase . 'authentication.html', 'post', [ - "saveSettings" => "1", - 'useAJAX' => '0', - 'page' => 'PLUGIN_SPOTTY', - 'playerid' => $player, - 'player' => $player, - 'username' => $user, - 'password' => $password, - 'accountId' => ''], null, 60); - print_r($res->getBody()); - echo '
'; - } - } else { - echo 'Logged in :)
'; - print_r($hascredentials); - print_r($hascredentials->getBody()); - } } \ No newline at end of file diff --git a/scripts/spotifychecklogin.php b/scripts/spotifychecklogin.php deleted file mode 100644 index 414af98..0000000 --- a/scripts/spotifychecklogin.php +++ /dev/null @@ -1,3 +0,0 @@ -