Added remove artwork option, and a few changes.
This commit is contained in:
parent
9f2d941c87
commit
2bb0976300
6 changed files with 106 additions and 39 deletions
|
@ -395,17 +395,20 @@ class LibraryController extends Zend_Controller_Action
|
|||
//on edit, if no artwork is set and audiofile has image, automatically add it
|
||||
if ($j["name"] == "artwork") {
|
||||
if ($j["value"] == null || $j["value"] == ''){
|
||||
$serialized["artwork"] = FileDataHelper::resetArtwork($file_id);
|
||||
$serialized["artwork"] = FileDataHelper::resetArtwork($file_id);
|
||||
}
|
||||
} elseif ($j["name"] == "set_artwork") {
|
||||
if ($j["value"] != null || $j["value"] != ''){
|
||||
$serialized["artwork"] = FileDataHelper::setArtwork($file_id, $j["value"] );
|
||||
}
|
||||
} elseif ($j["name"] == "remove_artwork") {
|
||||
if ($j["value"] == 1){
|
||||
$remove_artwork = true;
|
||||
$serialized["artwork"] = FileDataHelper::removeArtwork($file_id);
|
||||
}
|
||||
} else {
|
||||
$serialized[$j["name"]] = $j["value"];
|
||||
}
|
||||
|
||||
if ($j["name"] == "artwork_uploaded") {
|
||||
if ($j["value"] != null || $j["value"] != ''){
|
||||
$serialized["artwork"] = FileDataHelper::uploadArtwork($file_id, $j["value"] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitize any wildly incorrect metadata before it goes to be validated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue