summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/catalog.class.php18
-rw-r--r--lib/class/song.class.php6
2 files changed, 6 insertions, 18 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 43becdac..57186865 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1212,24 +1212,12 @@ class Catalog {
flush();
}
- /* Add this file to the list for removal from the db */
- $dead_files[] = $results;
- } //if error
-
- } //while gettings songs
-
- /* Incase there's been a snafo with a mount point on something
- * don't actually delete from DB here, simply disable and list
- */
- if (count($dead_files)) {
- foreach ($dead_files as $data) {
-
- $sql = "DELETE FROM song WHERE id='$data->id'";
+ $sql = "DELETE FROM song WHERE id='" . $results->id . "'";
$db_results = mysql_query($sql, dbh());
- } //end foreach
+ } //if error
- } // end if dead files
+ } //while gettings songs
/* Step two find orphaned Arists/Albums
* This finds artists and albums that no
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index c6fdcff9..d1a985b4 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -711,12 +711,12 @@ class Song {
$username = $GLOBALS['user']->username;
$song_id = $this->id;
if (conf('require_session')) {
- $session_string = "&sid=" . session_id();
+ $session_string = "&sid=" . session_id();
} // if they are requiring a session
$type = $this->type;
if ($GLOBALS['user']->prefs['play_type'] == 'downsample') {
- $ds_string = "&ds=" . $GLOBALS['user']->prefs['sample_rate'];
+ $ds_string = "&ds=" . $GLOBALS['user']->prefs['sample_rate'];
}
/* Account for retarded players */
@@ -724,7 +724,7 @@ class Song {
$this->format_song();
$song_name = rawurlencode($this->f_artist_full . " - " . $this->title . "." . $this->type);
- $url = conf('web_path') . "/play/index.php?song=$song_id&uid=$username$session_string$ds_string&name=$song_name";
+ $url = conf('web_path') . "/play/index.php?song=$song_id&uid=$username$session_string$ds_string&name=$song_name";
return $url;