]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Thu, 22 Aug 2019 07:27:02 +0000 (09:27 +0200)
committerVincent <vincent@enhydra.fr>
Thu, 22 Aug 2019 07:27:02 +0000 (09:27 +0200)
.idea/workspace.xml
scripts/lib/medialibrary.php
scripts/lib/squeezebox.php

index c37e09150805949684b9540badb784cd98d6e8f8..ebde92afb273d6cf51004cad9e4f51c66e562b3c 100644 (file)
@@ -4,6 +4,7 @@
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1566131336031" duration="140000" />
       <workItem from="1566150382844" duration="1598000" />
       <workItem from="1566371220982" duration="598000" />
-      <workItem from="1566376145799" duration="4113000" />
-    </task>
-    <task id="LOCAL-00157" summary=".">
-      <created>1551008694281</created>
-      <option name="number" value="00157" />
-      <option name="presentableId" value="LOCAL-00157" />
-      <option name="project" value="LOCAL" />
-      <updated>1551008694282</updated>
+      <workItem from="1566376145799" duration="4963000" />
+      <workItem from="1566402117063" duration="1534000" />
     </task>
     <task id="LOCAL-00158" summary=".">
       <created>1551008809120</created>
       <option name="project" value="LOCAL" />
       <updated>1566379769047</updated>
     </task>
-    <option name="localTasksCounter" value="206" />
+    <task id="LOCAL-00206" summary=".">
+      <created>1566380942924</created>
+      <option name="number" value="00206" />
+      <option name="presentableId" value="LOCAL-00206" />
+      <option name="project" value="LOCAL" />
+      <updated>1566380942924</updated>
+    </task>
+    <option name="localTasksCounter" value="207" />
     <servers />
   </component>
   <component name="TodoView">
index ff36f6e71d0c34588211c61998d9907cdbb5499b..4401891e2e3bac816334c18cf2998fa1f16b1f22 100644 (file)
@@ -125,6 +125,7 @@ function transcodeOneVideo()
 function nasToAvion($path)
 {
     $path = str_replace('/volume1/Share/', 'Z:/', $path);
+    $path = str_replace('/nas/', 'Z:/', $path);
     $path = str_replace('/mnt/sshfs/tortuga/Share/', 'Z:/', $path);
     $path = str_replace('/mnt/nfs/share/', 'Z:/', $path);
     $path = str_replace('/', '\\', $path);
index e5e31f12a9ca8e35ffa6f45102d515d4f2230e09..b20b94e285335fb7c92b1a9d21a9bc61d6c77b3b 100644 (file)
@@ -198,23 +198,33 @@ function getSqueezeFavorites($root = 0, $app = 'favorites', $level = 0)
 
 function checkSpottyLogin()
 {
-    $hascredentials = httpRequest(SQUEEZEBOX_SERVER . '/plugins/Spotty/settings/basic.html?_dc=' . time(), 'get', [], null, 10, false);
+    $spottybase = '/plugins/Spotty/settings/';
+    $hascredentials = httpRequest(SQUEEZEBOX_SERVER . $spottybase . 'basic.html?_dc=' . time(), 'get', [], null, 10, false);
 
     if ($hascredentials->getStatusCode() == 302) {
         global $squeezeboxPlayers;
         echo 'Not logged in !<br>';
         $player = $squeezeboxPlayers['Cuisine'];
 
-        $res = httpRequest(SQUEEZEBOX_SERVER . '/plugins/Spotty/settings/authentication.html', 'post', [
-            "saveSettings" => "1",
-            'useAJAX' => '0',
-            'page' => 'PLUGIN_SPOTTY',
-            'playerid' => $player,
-            'player' => $player,
-            'username' => SQUEEZEBOX_SPOTIFY_USERNAME,
-            'password' => SQUEEZEBOX_SPOTIFY_PASSWORD,
-            'accountId' => '']);
-        print_r($res->getBody());
+        $accounts = [
+            SQUEEZEBOX_SPOTIFY_USERNAME => SQUEEZEBOX_SPOTIFY_PASSWORD,
+            'jrme75009' => 'tortuga5009',
+            'v12l' => 'Lr8ka&7cs@fc%lW7'
+        ];
+
+        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());
+        }
     } else {
         echo 'Logged in :)';
         print_r($hascredentials);