Skip to content

Commit

Permalink
finessed album marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Nov 24, 2024
1 parent 686acf5 commit 237572a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/Albums.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public static function fromRecord($rec, $wantTracks = true) {
$res = new JsonResource("album", $rec["tag"]);
$res->links()->set(new Link("self", Engine::getBaseUrl()."album/".$rec["tag"]));
foreach(self::FIELDS as $field) {
if(!array_key_exists($field, $rec))
$tfield = $field == "coll" ? "iscoll" : $field;
if(!array_key_exists($tfield, $rec))
continue;

switch($field) {
Expand Down

0 comments on commit 237572a

Please sign in to comment.