-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
37 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2024 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2025 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -140,6 +140,9 @@ public static function fromRecord($rec, $wantTracks = true) { | |
case "coll": | ||
$value = $rec["iscoll"]?true:false; | ||
break; | ||
case "bin": | ||
$value = $rec["location"] == ILibrary::LOCATION_STORAGE ? $rec[$field] ?? null : null; | ||
break; | ||
default: | ||
$value = $rec[$field] ?? null; | ||
break; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2024 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2025 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -191,7 +191,7 @@ protected function paginateOffset(RequestInterface $request, array $paginateOps, | |
$key = $locationMap[$normalKey]; | ||
|
||
// allow optional bin constraint for storage | ||
if($key == "G" && $request->hasFilter("bin")) | ||
if($key == ILibrary::LOCATION_STORAGE && $request->hasFilter("bin")) | ||
$key .= "|" . $request->filterValue("bin"); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2023 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2025 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -62,6 +62,12 @@ interface ILibrary { | |
"S"=>"Single", | ||
]; | ||
|
||
const LOCATION_AWAITING_REVIEW = 'E'; | ||
const LOCATION_IN_REVIEW = 'F'; | ||
const LOCATION_REVIEWED = 'H'; | ||
const LOCATION_STORAGE = 'G'; | ||
const LOCATION_LIBRARY = 'L'; | ||
|
||
const LOCATIONS = [ | ||
"D"=>"Received", | ||
"E"=>"Review Shelf", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2024 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2025 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -50,8 +50,17 @@ private function getNextPubkey() { | |
} | ||
|
||
public function insertUpdateAlbum(&$album, $tracks, $label) { | ||
if($album["location"] != "F" && $album["location"] != "G") | ||
$album["bin"] = ""; | ||
switch($album["location"]) { | ||
case ILibrary::LOCATION_STORAGE: | ||
break; | ||
case ILibrary::LOCATION_IN_REVIEW: | ||
$oa = $album['tag'] ? Engine::api(ILibrary::class)->search(ILibrary::ALBUM_KEY, 0, 1, $album['tag']) : []; | ||
$album['bin'] = count($oa) && $oa[0]['location'] == ILibrary::LOCATION_IN_REVIEW ? $oa[0]['bin'] : ''; | ||
break; | ||
default: | ||
$album['bin'] = ''; | ||
break; | ||
} | ||
|
||
$name = $label && array_key_exists("name", $label) ? | ||
mb_substr(trim($label["name"]), 0, PlaylistEntry::MAX_FIELD_LENGTH) : null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2024 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2025 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -1139,7 +1139,7 @@ private function albumForm() { | |
$amedium = $row["medium"]; | ||
$aformat = $row["size"]; | ||
$alocation = $row["location"]; | ||
$bin = $row["bin"]; | ||
$bin = $alocation == ILibrary::LOCATION_STORAGE ? $row["bin"] : ''; | ||
$coll = substr($artist, 0, 8) == "[coll]: "; | ||
$name = $_REQUEST["name"]; | ||
if(!$name) { | ||
|
@@ -1201,7 +1201,7 @@ private function albumForm() { | |
echo " <OPTION VALUE=\"$code\"$selected>$location\n"; | ||
} | ||
?> | ||
</SELECT> <SPAN ID=lbin STYLE="visibility:<?php echo ($alocation == 'G')?"visible":"hidden";?>">Bin: </SPAN><INPUT NAME=bin TYPE=text CLASS=text SIZE=10 maxlength='8' VALUE="<?php echo $bin;?>" STYLE="visibility:<?php echo ($alocation == 'G')?"visible":"hidden";?>"></TD></TR> | ||
</SELECT> <SPAN ID=lbin STYLE="visibility:<?php echo ($alocation == ILibrary::LOCATION_STORAGE) ? "visible" : "hidden"; ?>">Bin: </SPAN><INPUT NAME=bin TYPE=text CLASS=text SIZE=10 maxlength='8' VALUE="<?php echo $bin;?>" STYLE="visibility:<?php echo ($alocation == ILibrary::LOCATION_STORAGE) ? "visible" : "hidden"; ?>"></TD></TR> | ||
<?php | ||
if(!$_REQUEST["new"]) { | ||
?> | ||
|