summaryrefslogtreecommitdiff
path: root/app/ui/listing.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/ui/listing.php')
-rw-r--r--app/ui/listing.php34
1 files changed, 32 insertions, 2 deletions
diff --git a/app/ui/listing.php b/app/ui/listing.php
index d29b355..29a1bce 100644
--- a/app/ui/listing.php
+++ b/app/ui/listing.php
@@ -37,6 +37,27 @@ if (!$presetList) {
}
}
+if (!isset($onlyStella)) $onlyStella = false;
+
+if ($onlyStella) {
+ $hasAlbum = false;
+ $list = $songs;
+
+ foreach ($albums as $id => $album) {
+ foreach ($album["tracks"] as $track) {
+ $list[$track]["_albumID"] = $id;
+ }
+ }
+
+ uasort($list, function ($a, $b) {
+ return strcmp($a["title"], $b["title"]);
+ });
+
+ $list = array_filter($list, function ($i) {
+ return file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/content/" . $i . ".stella");
+ }, ARRAY_FILTER_USE_KEY);
+}
+
?>
<!doctype html>
<html lang="en">
@@ -55,6 +76,8 @@ if (!$presetList) {
Favorites
<?php elseif ($hasAlbum): ?>
<?= $albums[$_GET["a"]]["title"] ?>
+ <?php elseif ($onlyStella): ?>
+ Mist Stella
<?php else: ?>
Songs
<?php endif; ?>
@@ -74,7 +97,7 @@ if (!$presetList) {
<div id="ui-back-button" onclick="history.back();" style="display: flex; align-items: center; justify-content: center; text-align: center;<?php if (!$hasAlbum): ?>pointer-events: none; opacity: 0;<?php endif; ?>">
<img src="/assets/icons/back.svg" alt="Back" class="icon">
</div>
- <div style="display: flex; align-items: center; justify-content: center; text-align: center;"><b><?php if (!$hasAlbum && !isset($favoritesList)): ?>Songs<?php endif; ?></b></div>
+ <div style="display: flex; align-items: center; justify-content: center; text-align: center;"><b><?php if (!$hasAlbum && !isset($favoritesList) && !$onlyStella): ?>Songs<?php elseif ($onlyStella): ?>Mist Stella<?php endif; ?></b></div>
<?php if (!$hasAlbum): ?>
<div>
<input placeholder="Filter" id="filter" class="form-control" style="width: 256px;height: 32px;border-top: none;" onchange="updateFilter();" onkeyup="updateFilter();">
@@ -145,9 +168,16 @@ if (!$presetList) {
<img src='/assets/icons/lossless.svg' alt='' class='icon player-badge-icon'>Hi-Res Lossless
<?php if ($albums[$_GET["a"]]["stella"]): ?><span class="mist-stella"> ยท </span><?php endif; ?>
<?php endif; if ($albums[$_GET["a"]]["stella"]): ?>
- <span class="mist-stella"><img src='/assets/icons/stella.svg' alt='' style="height: 14.4px !important; width: 14.4px !important;" class='icon player-badge-icon'>Mist Stella</span>
+ <span class="mist-stella"><img src='/assets/icons/stella.svg' alt='' style="height: 14.4px !important; width: 14.4px !important;" class='icon player-badge-icon'><img src='/assets/icons/stella-full.svg' alt='' class='mist-stella-text icon player-badge-icon'></span>
<?php endif; ?>
</div>
+ <style>
+ .mist-stella-text {
+ width: 68px !important;
+ position: relative !important;
+ top: -1px !important;
+ }
+ </style>
</div>
<div id="album-info-buttons" <?php if (!in_array($_GET["a"], $library)): ?>class="nolibrary"<?php endif; ?>>
<?php if (in_array($_GET["a"], $library)): ?>