1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

few more fixes to sort files script

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-01-08 21:37:49 +00:00
parent d2d40fdd0f
commit 7634fe3b04
3 changed files with 21 additions and 3 deletions

View file

@ -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
@ -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); }

View file

@ -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

View file

@ -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