From 747d8f88d5a635ba68b3f6288fb8d1f3fe48f83d Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Wed, 29 Nov 2023 22:27:20 +0100 Subject: Updated 19 files, added 5 files and deleted app/studio.php (automated) --- .DS_Store | Bin 20484 -> 20484 bytes api/hasVideo.php | 11 ++ app/.DS_Store | Bin 6148 -> 6148 bytes app/index.php | 6 +- app/studio.php | 445 ----------------------------------------------- app/ui/listing.php | 27 ++- app/ui/lyrics.php | 134 +++++++++----- app/ui/navigation.php | 12 +- app/ui/settings.php | 11 +- app/ui/stella.php | 2 +- app/ui/video.php | 7 + assets/.DS_Store | Bin 10244 -> 10244 bytes assets/delays.json | 15 ++ assets/icons/now.svg | 1 + assets/icons/video.svg | 1 + assets/native.css | 8 - desktop/main.js | 39 ----- desktop/preload.js | 3 +- includes/session.php | 17 ++ index.php | 2 + oauth/.DS_Store | Bin 6148 -> 6148 bytes oauth/callback/index.php | 2 +- oauth/init/index.php | 2 +- profile/index.php | 2 +- version | 2 +- 25 files changed, 190 insertions(+), 559 deletions(-) create mode 100644 api/hasVideo.php delete mode 100644 app/studio.php create mode 100644 app/ui/video.php create mode 100644 assets/delays.json create mode 100644 assets/icons/now.svg create mode 100644 assets/icons/video.svg diff --git a/.DS_Store b/.DS_Store index 36baf1f..1a02e99 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/api/hasVideo.php b/api/hasVideo.php new file mode 100644 index 0000000..0881c78 --- /dev/null +++ b/api/hasVideo.php @@ -0,0 +1,11 @@ +", ""); + MistNative.version("", ""); MistNative.userInfo(``); } @@ -209,6 +209,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI if (name === "lyrics") showLyrics(); if (name === "search") name = "home"; if (name === "stella") name = "settings"; + if (name === "video") 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) { @@ -456,6 +457,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI } playerDocument.getElementById("player-audio").onplay = () => { + document.getElementById("lyrics-page").contentWindow.updateVideo(); updateAndroidNotification(); if (window.preloadedGains[window.currentSongID]) { @@ -497,6 +499,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI } playerDocument.getElementById("player-audio").onpause = () => { + document.getElementById("lyrics-page").contentWindow.updateVideo(); + if (window.preloadedGains[window.currentSongID]) { try { window.currentNormalizationSource.disconnect(); diff --git a/app/studio.php b/app/studio.php deleted file mode 100644 index 4f002f7..0000000 --- a/app/studio.php +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - Mist Studio - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/ui/listing.php b/app/ui/listing.php index 29a1bce..fdef674 100644 --- a/app/ui/listing.php +++ b/app/ui/listing.php @@ -37,9 +37,9 @@ if (!$presetList) { } } -if (!isset($onlyStella)) $onlyStella = false; +if (!isset($onlyStella)) $onlyStella = 0; -if ($onlyStella) { +if ($onlyStella === 1) { $hasAlbum = false; $list = $songs; @@ -56,6 +56,23 @@ if ($onlyStella) { $list = array_filter($list, function ($i) { return file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/content/" . $i . ".stella"); }, ARRAY_FILTER_USE_KEY); +} elseif ($onlyStella === 2) { + $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 . ".webm"); + }, ARRAY_FILTER_USE_KEY); } ?> @@ -76,8 +93,10 @@ if ($onlyStella) { Favorites - + Mist Stella + + Music videos Songs @@ -97,7 +116,7 @@ if ($onlyStella) {
Back
-
SongsMist Stella
+
SongsMist StellaMusic videos
diff --git a/app/ui/lyrics.php b/app/ui/lyrics.php index 274ff93..103167c 100644 --- a/app/ui/lyrics.php +++ b/app/ui/lyrics.php @@ -46,7 +46,10 @@
-
+ + @@ -58,94 +61,119 @@ Loading lyrics...
+ +
\ No newline at end of file diff --git a/app/ui/navigation.php b/app/ui/navigation.php index 0125418..617bc63 100644 --- a/app/ui/navigation.php +++ b/app/ui/navigation.php @@ -39,6 +39,12 @@ + + @@ -51,12 +57,6 @@ - - diff --git a/app/ui/settings.php b/app/ui/settings.php index 4897f06..d4cb6f2 100644 --- a/app/ui/settings.php +++ b/app/ui/settings.php @@ -33,7 +33,7 @@
+ About Mist
- Mist version (build ) ·
© Equestria.dev
+ Mist version (build ) ·
© Equestria.dev
+ + + + + diff --git a/index.php b/index.php index 141bdca..f987d9f 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,7 @@ -vf scale=1280:720,fps=fps=24 -an .webm + header("X-Frame-Options: DENY"); require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; header("Location: /app/"); diff --git a/oauth/.DS_Store b/oauth/.DS_Store index 2a12673..e14fa9f 100644 Binary files a/oauth/.DS_Store and b/oauth/.DS_Store differ diff --git a/oauth/callback/index.php b/oauth/callback/index.php index bbb3322..bb3f57f 100644 --- a/oauth/callback/index.php +++ b/oauth/callback/index.php @@ -19,7 +19,7 @@ curl_setopt($crl, CURLOPT_HTTPHEADER, [ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json" ]); -curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode(($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']); +curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode(($_SERVER['HTTP_HOST'] === "mist-testing.equestria.horse" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']); $result = curl_exec($crl); $result = json_decode($result, true); diff --git a/oauth/init/index.php b/oauth/init/index.php index f0696b2..4f2be05 100644 --- a/oauth/init/index.php +++ b/oauth/init/index.php @@ -4,5 +4,5 @@ header("X-Frame-Options: DENY"); $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $server = "account.equestria.dev"; -header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $app["id"] . "&response_type=code&redirect_uri=" . ($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline"); +header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $app["id"] . "&response_type=code&redirect_uri=" . ($_SERVER['HTTP_HOST'] === "mist-testing.equestria.horse" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline"); die(); diff --git a/profile/index.php b/profile/index.php index 2005b5f..f7c6984 100644 --- a/profile/index.php +++ b/profile/index.php @@ -366,7 +366,7 @@ function allowed(string $item): bool {
- Powered by Mist (Version , Build ) ·
© Equestria.dev
+ Powered by Mist (Version , Build ) ·
© Equestria.dev
diff --git a/version b/version index 7b378be..abb1658 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.8.4 \ No newline at end of file +1.9.0 \ No newline at end of file -- cgit