summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2023-11-17 23:25:54 +0100
committerRaindropsSys <raindrops@equestria.dev>2023-11-17 23:25:54 +0100
commitc2a38a4847dfa9f561717cfc9858c275caa33876 (patch)
tree149bb7626f4495558c781fbcd621434e3cf7e6df /app
parentca4588f1b8200ef93e1614f2274a960bbb9fd53e (diff)
downloadmist-c2a38a4847dfa9f561717cfc9858c275caa33876.tar.gz
mist-c2a38a4847dfa9f561717cfc9858c275caa33876.tar.bz2
mist-c2a38a4847dfa9f561717cfc9858c275caa33876.zip
Updated 14 files and added 2 files (automated)
Diffstat (limited to 'app')
-rw-r--r--app/.DS_Storebin6148 -> 6148 bytes
-rw-r--r--app/index.php17
-rw-r--r--app/ui/listing.php34
-rw-r--r--app/ui/player-mobile.php8
-rw-r--r--app/ui/player.php8
-rw-r--r--app/ui/settings.php17
-rw-r--r--app/ui/stella.php7
7 files changed, 80 insertions, 11 deletions
diff --git a/app/.DS_Store b/app/.DS_Store
index 251444b..b01224a 100644
--- a/app/.DS_Store
+++ b/app/.DS_Store
Binary files differ
diff --git a/app/index.php b/app/index.php
index 72ca74b..31ca9aa 100644
--- a/app/index.php
+++ b/app/index.php
@@ -208,6 +208,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI
if (!name || typeof name !== "string") name = window.name;
if (name === "lyrics") showLyrics();
if (name === "search") name = "home";
+ if (name === "stella") name = "settings";
Array.from(document.getElementById("navigation").contentDocument.getElementsByClassName("navigation-item")).map(i => i.classList.remove("active"));
document.getElementById("navigation").contentDocument.getElementById(name).classList.add("active");
} catch (e) {
@@ -250,6 +251,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI
localStorage.setItem("normalize", "true");
}
+ if (!localStorage.getItem("overamp")) {
+ localStorage.setItem("overamp", "false");
+ }
+
if (!localStorage.getItem("desktop-notification")) {
localStorage.setItem("desktop-notification", "true");
}
@@ -939,9 +944,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI
if (stellaCompatible) {
window.preloaded[id] = await Stella.build("/assets/content/" + id + ".stella");
- window.preloadedGains[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, 0);
- window.preloadedGainsBoosted1[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, .05);
- window.preloadedGainsBoosted2[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, .1);
+ window.preloadedGains[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, 0, true);
+ window.preloadedGainsBoosted1[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, .05, true);
+ window.preloadedGainsBoosted2[id] = await normalizeAudio(window.preloaded[id].stems.vocals.buffer, .1, true);
} else {
if (!window.preloaded[id]) {
window.buffering = true;
@@ -1075,9 +1080,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI
if (stellaCompatible) {
window.preloaded[id] = await Stella.build("/assets/content/" + id + ".stella");
- window.preloadedGains[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, 0);
- window.preloadedGainsBoosted1[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, .05);
- window.preloadedGainsBoosted2[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, .1);
+ window.preloadedGains[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, 0, true);
+ window.preloadedGainsBoosted1[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, .05, true);
+ window.preloadedGainsBoosted2[id] = await normalizeAudio(window.preloaded[id].stems.other.buffer, .1, true);
} else {
if (!window.preloaded[id]) {
if (localStorage.getItem("data-saving") === "true") {
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)): ?>
diff --git a/app/ui/player-mobile.php b/app/ui/player-mobile.php
index e49e852..80c39d4 100644
--- a/app/ui/player-mobile.php
+++ b/app/ui/player-mobile.php
@@ -138,7 +138,13 @@
</span>
<span id="badge-stella" style="display: block;border: 1px solid transparent;color: rgba(255, 255, 255, .5);background-color: rgba(255, 255, 255, .1);padding: 2px 5px;border-radius: 5px;font-size: 12px;position: fixed;margin-left: auto;margin-right: auto;width: max-content;left: 0;right: 0;bottom: calc(120px + var(--android-navigation-bar));">
<span style="display: grid; grid-template-columns: max-content max-content">
- <span><img src="/assets/icons/stella.svg" alt="" class="player-badge-icon" style="height: 14.4px; width: 14.4px !important; filter: invert(1); opacity: .5;">Mist Stella</span>
+ <span><img src="/assets/icons/stella.svg" alt="" class="player-badge-icon" style="height: 14.4px; width: 14.4px !important; filter: invert(1); opacity: .5;"><img src='/assets/icons/stella-full.svg' class='stella-logo-full'></span>
+ <style>
+ .stella-logo-full {
+ height: 12px;
+ filter: invert(1);
+ }
+ </style>
</span>
</span>
</div>
diff --git a/app/ui/player.php b/app/ui/player.php
index 4c5298c..47526f5 100644
--- a/app/ui/player.php
+++ b/app/ui/player.php
@@ -97,7 +97,13 @@
<div>
<span class="player-badge-desktop" data-bs-html="true" data-bs-toggle="tooltip" id="badge-cd" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/lossless.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span>
<span class="player-badge-desktop" data-bs-html="true" data-bs-toggle="tooltip" id="badge-hires" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/lossless.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span>
- <span class="player-badge-desktop" data-bs-html="true" title="<b>Mist Stella</b>" data-bs-toggle="tooltip" id="badge-stella" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/stella.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span>
+ <span class="player-badge-desktop" data-bs-html="true" title="<img src='/assets/icons/stella-full.svg' class='stella-logo-full'>" data-bs-toggle="tooltip" id="badge-stella" style="z-index: 9999; display: none;position: absolute;margin-left: 71px;"><img src="/assets/icons/stella.svg" alt="" style="height: 12px;opacity: .5;" class="icon"></span>
+ <style>
+ .stella-logo-full {
+ height: 12px;
+ filter: invert(1);
+ }
+ </style>
<div id="info" style="display: none; grid-template-columns: 64px 1fr; height: 64px; border-left: 1px solid rgba(0, 0, 0, .25); border-right: 1px solid rgba(0, 0, 0, .25);">
<img alt="" id="album-art" style="background-color: rgba(0, 0, 0, .1); height: 64px; width: 64px;">
<div id="info-grid" style="z-index: 9; display: grid; grid-template-rows: 2px 22px 22px 12px 6px;">
diff --git a/app/ui/settings.php b/app/ui/settings.php
index fe421a0..26217f0 100644
--- a/app/ui/settings.php
+++ b/app/ui/settings.php
@@ -45,6 +45,21 @@
</script>
<div class="form-check form-switch" style="margin-top: 10px;">
+ <input onchange="saveOA();" class="form-check-input" type="checkbox" role="switch" id="noamp">
+ <label class="form-check-label" for="noamp">
+ Disable audio amplification
+ <div class="text-muted small">By default, Mist makes your music louder, so it doesn't otherwise seem too quiet. If you have issues with clipping, or this feature does not otherwise play nicely with your device, you might want to turn on this option.</div>
+ </label>
+ </div>
+ <script>
+ if (localStorage.getItem("noamp") === "true") document.getElementById("noamp").checked = true;
+ function saveOA() {
+ localStorage.setItem("noamp", document.getElementById("noamp").checked ? "true" : "false");
+ window.parent.location.reload();
+ }
+ </script>
+
+ <div class="form-check form-switch" style="margin-top: 10px;">
<input onchange="saveN();" class="form-check-input" type="checkbox" role="switch" id="normalize">
<label class="form-check-label" for="normalize">
Normalize loudness
@@ -63,7 +78,7 @@
<input onchange="saveST();" class="form-check-input" type="checkbox" role="switch" id="enable-stella">
<label class="form-check-label" for="enable-stella">
Mist Stella
- <div class="text-muted small">Enjoy your music is a unique way thanks to the Mist Stella spatial audio technology. Stella makes your music feel like it's coming from all around you, giving you a concert-like experience. Note that Stella uses slightly more bandwidth than lossless streaming.</div>
+ <div class="text-muted small">Enjoy your music is a unique way thanks to the Mist Stella spatial audio technology. Stella makes your music feel like it's coming from all around you, giving you a concert-like experience. Note that Stella uses slightly more bandwidth than lossless streaming. <a href="#" onclick="window.parent.location.hash = '#/stella';">See compatible songs.</a></div>
</label>
</div>
<script>
diff --git a/app/ui/stella.php b/app/ui/stella.php
new file mode 100644
index 0000000..143a172
--- /dev/null
+++ b/app/ui/stella.php
@@ -0,0 +1,7 @@
+<?php
+
+header("X-Frame-Options: SAMEORIGIN");
+unset($_GET["a"]);
+$onlyStella = true;
+global $onlyStella;
+require_once "./listing.php"; \ No newline at end of file