librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1516] rearrange this because I don't know why the alb


From: Clint Adams
Subject: [Librefm-commits] [1516] rearrange this because I don't know why the album isn't being added
Date: Tue, 12 May 2009 02:04:15 +0000

Revision: 1516
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1516
Author:   clint
Date:     2009-05-12 02:04:14 +0000 (Tue, 12 May 2009)
Log Message:
-----------
rearrange this because I don't know why the album isn't being added

Modified Paths:
--------------
    trunk/gnukebox/scrobble-utils.php

Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php   2009-05-12 01:54:33 UTC (rev 1515)
+++ trunk/gnukebox/scrobble-utils.php   2009-05-12 02:04:14 UTC (rev 1516)
@@ -85,25 +85,26 @@
 
        if(!$name) {
                // Album doesn't exist, so create it
-               
-         $art = $adodb->qstr(getAlbumArt($artist, $album));
 
-       try {
-         if ($art !="") {
-           $license = $adodb->qstr("amazon");
+               $art = $adodb->qstr(getAlbumArt($artist, $album));
 
-           $res = $adodb->Execute("INSERT INTO Album (name, artist_name, 
image, artwork_license) VALUES (" . ($album) . ", " . ($artist) . ", " . ($art) 
. ", " . ($license) .")");
+               if ($art !="") {
+                       $license = $adodb->qstr("amazon");
 
-         } else {
+                       $sql = "INSERT INTO Album (name, artist_name, image, 
artwork_license) VALUES (" . ($album) . ", " . ($artist) . ", " . ($art) . ", " 
. ($license) .")";
 
-               $res = $adodb->Execute("INSERT INTO Album (name, artist_name) 
VALUES (" . ($album) . ", " . ($artist) . ")");
+               } else {
 
-         }
+                       $sql = "INSERT INTO Album (name, artist_name) VALUES (" 
. ($album) . ", " . ($artist) . ")";
+
+               }
+               try {
+                       $adodb->Execute($sql);
+               }
+               catch (exception $e) {
+                       die("FAILED albc " . $e->getMessage() . "\n");
+               }
        }
-       catch (exception $e) {
-               die("FAILED albc " . $e->getMessage() . "\n");
-       }
-       }
 }
 
 function getTrackCreateIfNew($artist, $album, $track, $mbid) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]