Skip to content

Commit

Permalink
finessed previous revision to preference exact match only if not Prom…
Browse files Browse the repository at this point in the history
…o or Special Edition
  • Loading branch information
RocketMan committed Feb 12, 2024
1 parent f0c1322 commit 47f4339
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ui/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,9 @@ private function prefillTracks() {
if($json->results && ($result = $json->results[0])) {
foreach($json->results as $r) {
// exact medium match is definitive
// use if current best is Promo or Limited/Special Edition
// if not Promo or Limited/Special Edition
if(in_array($format, $r->format) &&
(!in_array($format, $result->format) ||
self::isSpecialEdition($result->format))) {
!self::isSpecialEdition($r->format)) {
$result = $r;
break;
}
Expand Down

0 comments on commit 47f4339

Please sign in to comment.