summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/sort_files.php.inc12
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/catalog.class.php10
3 files changed, 21 insertions, 3 deletions
diff --git a/bin/sort_files.php.inc b/bin/sort_files.php.inc
index db259810..8fd2b673 100644
--- a/bin/sort_files.php.inc
+++ b/bin/sort_files.php.inc
@@ -208,6 +208,8 @@ function sort_clean_name($string) {
/* First remove any / or \ chars */
$string = preg_replace("/[\/\\\]/","-",$string);
+ $string = str_replace(":"," ",$string);
+
return $string;
} // sort_clean_name
@@ -237,7 +239,7 @@ function sort_move_file($song,$fullname) {
unset($data[0]);
foreach ($data as $dir) {
-
+
$path .= "/" . $dir;
/* We need to check for the existance of this directory */
@@ -264,6 +266,14 @@ function sort_move_file($song,$fullname) {
echo "\tSQL: $sql\n";
}
else {
+
+ /* Check for file existance */
+ if (file_exists($fullname)) {
+ if (conf('debug')) { log_event('commandline','file exists','Error: $fullname already exists'); }
+ echo "Error: $fullname already exists\n";
+ return false;
+ }
+
$results = copy($song->file,$fullname);
if (conf('debug')) { log_event('commandline','copy','Copied ' . $song->file . ' to ' . $fullname); }
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index f1601863..2e2bf0d6 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2-Beta1
+ - Fixed counting error when using the /bin/catalog_update.php.inc
+ script
- Fixed some minor theme issues with the built in themes
- Fixed some RSS problems, and linked it on header (Thx pb1dft)
- Fixed bug where you couldn't delete admin users because of an
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index e7b6357b..538696e9 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1190,13 +1190,15 @@ class Catalog {
$this->clean_stats();
$this->clean_playlists();
$this->clean_flagged();
- $this->clean_genres();
-
+ ;$this->clean_genres();
+
/* Return dead files, so they can be listed */
echo "<b>" . _("Catalog Clean Done") . " [" . count($dead_files) . "] " . _("files removed") . "</b><br />\n";
flush();
return $dead_files;
+ $this->count = 0;
+
} //clean_catalog
/**
@@ -1571,6 +1573,10 @@ class Catalog {
echo "Update Finished. Checked $this->count. $total_updated songs updated.<br /><br />";
+ $this->count = 0;
+
+ return true;
+
} //verify_catalog