</component>
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change beforePath="$PROJECT_DIR$/.docker/config/monit/conf.d/home" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/config/monit/conf.d/home" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/bin/healthcheck" beforeDir="false" afterPath="$PROJECT_DIR$/bin/healthcheck" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/bin/restart-logcat" beforeDir="false" afterPath="$PROJECT_DIR$/bin/restart-logcat" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/servers/logcatb.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/spotifychecklogin.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/squeeze.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/squeeze.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1774028822942" duration="792000" />
<workItem from="1774430967346" duration="6359000" />
<workItem from="1774441121722" duration="7518000" />
- <workItem from="1774603188976" duration="5376000" />
+ <workItem from="1774603188976" duration="5658000" />
</task>
<task id="LOCAL-00502" summary=".">
<created>1641726946298</created>
<option name="project" value="LOCAL" />
<updated>1687259667913</updated>
</task>
- <option name="localTasksCounter" value="650" />
+ <option name="localTasksCounter" value="651" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
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 !<br>';
- $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 '<br>';
- }
- } else {
- echo 'Logged in :)<br>';
- print_r($hascredentials);
- print_r($hascredentials->getBody());
- }
}
\ No newline at end of file
+++ /dev/null
-<?php
-require_once "import.php";
-checkSpottyLogin();
\ No newline at end of file
$requests = json_decode($_GET['requests']);
}
-if (isset($_GET['type']) && $_GET['type'] == 'squeeze_spotify') {
- checkSpottyLogin(true);
-}
-
-
$res = [];
foreach ($requests as $request) {
squeezeRequest($request, $_GET['player']);