CC-2582 : Files with a tracknumber that isn't actually a tracknumber don't get imported properly
adding more metadata checks so it won't have a database insertion issue.
This commit is contained in:
parent
276fa8d99e
commit
d3776f4ea9
4 changed files with 15 additions and 30 deletions
|
@ -454,21 +454,6 @@ class ApiController extends Zend_Controller_Action
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
//Martin Konecny July 14th, 2011: The following commented out code is the way
|
||||
//we used to check for duplicates (by md5). Why are we checking by md5 and
|
||||
//not by filepath?
|
||||
/*
|
||||
$md5 = $md['MDATA_KEY_MD5'];
|
||||
$file = StoredFile::RecallByMd5($md5);
|
||||
if (is_null($file)) {
|
||||
$file = StoredFile::Insert($md);
|
||||
}
|
||||
else {
|
||||
$this->view->error = "File already exists in Airtime.";
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
else if ($mode == "modify") {
|
||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||
|
|
|
@ -91,13 +91,6 @@ class StoredFile {
|
|||
}
|
||||
}
|
||||
|
||||
public static function getFileCount()
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT count(*) as cnt FROM ".$CC_CONFIG["filesTable"];
|
||||
return $CC_DBC->GetOne($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set multiple metadata values using database columns as indexes.
|
||||
*
|
||||
|
@ -826,6 +819,13 @@ class StoredFile {
|
|||
|
||||
}
|
||||
|
||||
public static function getFileCount()
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT count(*) as cnt FROM ".$CC_CONFIG["filesTable"];
|
||||
return $CC_DBC->GetOne($sql);
|
||||
}
|
||||
|
||||
public static function listAllFiles($dir_id){
|
||||
global $CC_DBC;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue