summaryrefslogtreecommitdiff
path: root/_frame
diff options
context:
space:
mode:
Diffstat (limited to '_frame')
-rw-r--r--_frame/about/index.php6
-rw-r--r--_frame/home/index.php4
-rw-r--r--_frame/homeless/index.php1
-rw-r--r--_frame/library.internal/main.php2
-rw-r--r--_frame/library.internal/view.php2
-rw-r--r--_frame/library/index.php38
-rw-r--r--_frame/library/main.php59
-rw-r--r--_frame/settings/index.php31
8 files changed, 126 insertions, 17 deletions
diff --git a/_frame/about/index.php b/_frame/about/index.php
index 7bdd290..c566990 100644
--- a/_frame/about/index.php
+++ b/_frame/about/index.php
@@ -33,9 +33,7 @@
</div>
</div>
- <?php if (str_contains($_SERVER['HTTP_USER_AGENT'], "+AutomateCloud/") && !$_FAMILINE): ?>
- <p>For more details and legal notices, go to the About Argon screen in the app's menus.</p>
- <?php endif; ?>
+ <p><?= l("Powered by the Equestria Lossless Audio Codec", "Propulsé par le codec audio sans perte d'Equestria (ELAC)") ?></p>
<div id="frame-about-debug">
<b><?= l("Player Info", "Infos lecteur ") ?>:</b><br>
@@ -57,7 +55,7 @@
<span id="frame-about-debug--nextSong"><?= l("&lt;not playing&gt;", "&lt;pas de lecture&gt;") ?></span>
<span><?= l("Position", "Position ") ?>:</span>
- <span id="frame-about-debug--position"><?= l("&lt;not playing&gt;", "&lt;pas de lecture&gt;") ?></span>
+ <code id="frame-about-debug--position" style="font-family: monospace;"><?= l("&lt;not playing&gt;", "&lt;pas de lecture&gt;") ?></code>
<span><?= l("Playback Quality", "Qualité lecture ") ?>:</span>
<span id="frame-about-debug--quality"><?= l("&lt;not playing&gt;", "&lt;pas de lecture&gt;") ?></span>
diff --git a/_frame/home/index.php b/_frame/home/index.php
index 0ea9691..4dcbd8b 100644
--- a/_frame/home/index.php
+++ b/_frame/home/index.php
@@ -23,11 +23,13 @@
<div id="frame-home-intro" <?= $_FAMILINE ? "style=\"filter: hue-rotate(150deg);\"" : "" ?>>
<img src="<?= str_contains($_SERVER['HTTP_USER_AGENT'], "+AutomateCloud/") ? ("/native.svg") : ($_FAMILINE ? "https://familine.minteck.org/icns/familine-music.svg" : "/favicon.svg") ?>" id="frame-home-logo" <?= $_FAMILINE ? "style=\"filter: hue-rotate(-150deg);\"" : "" ?>>
<div id="frame-home-welcome"><?= l("Welcome to the Argon Media Platform!", "Bienvenue sur Familine Musique !") ?></div>
- <div id="frame-home-tagline"><?= l("High quality ad-free music from Minteck", "Musique de haute qualité et sans publicités de la famille") ?></div>
+ <div id="frame-home-tagline"><?= l("High quality ad-free music from Minteck, powered by ELAC", "Musique de haute qualité et sans publicités de la famille, propulsé par ELAC") ?></div>
<button onclick="location.href='/_frame/library';" id="frame-home-button"><?= l("Browse Library", "Explorer la bibliothèque") ?></button>
<div id="frame-home-links">
<a onclick="location.href='/_frame/about';" id="frame-home-link-about" class="frame-home-link"><?= l("About Argon", "À propos") ?></a>
·
+ <a onclick="window.open('https://git.equestria.dev/equestria.dev/elac');" id="frame-home-link-source" class="frame-home-link"><?= l("About ELAC", "À propos de ELAC") ?></a>
+ ·
<?php if (!$_FAMILINE): ?>
<a onclick="location.href='/_frame/copyright';" id="frame-home-link-about" class="frame-home-link"><?= l("Copyright", "Droits d'auteurs") ?></a>
·
diff --git a/_frame/homeless/index.php b/_frame/homeless/index.php
new file mode 100644
index 0000000..b65f416
--- /dev/null
+++ b/_frame/homeless/index.php
@@ -0,0 +1 @@
+homeless -_- \ No newline at end of file
diff --git a/_frame/library.internal/main.php b/_frame/library.internal/main.php
index 5ffc26b..0b0a52a 100644
--- a/_frame/library.internal/main.php
+++ b/_frame/library.internal/main.php
@@ -20,7 +20,7 @@
<?= l("Library", "Bibliothèque") ?>
</div>
<div id="frame-contents">
- <?php $data = json_decode(file_get_contents("https://argon.minteck.org/api/get_list.php"), true); ?>
+ <?php $data = json_decode(file_get_contents("https://forced.argon.minteck.org/api/get_list.php"), true); ?>
<div id="frame-library-listing">
<?php foreach ($data["listing"] as $item): ?>
<div onclick="if (!event.target.classList.contains('frame-library-item-part-song')) location.href='/_frame/library/<?= $item["_id"] ?>';" class="frame-library-item" id="frame-library-item--<?= $item["_type"] . "-" . $item["_id"] ?>">
diff --git a/_frame/library.internal/view.php b/_frame/library.internal/view.php
index e2c9d2a..54b3c85 100644
--- a/_frame/library.internal/view.php
+++ b/_frame/library.internal/view.php
@@ -1,6 +1,6 @@
<?php if (str_ends_with($_SERVER['HTTP_HOST'], ".familine.minteck.org")) { $_FAMILINE = true; setlocale(LC_TIME, array('fr_FR.UTF-8','fr_FR@euro','fr_FR','french')); } else { $_FAMILINE = false; } function l($en, $fr) { global $_FAMILINE; if ($_FAMILINE) { return $fr; } else { return $en; } } $root = $_SERVER['DOCUMENT_ROOT']; $root = $_SERVER['DOCUMENT_ROOT'];
-$data = json_decode(file_get_contents("https://argon.minteck.org/api/get_list.php"), true);
+$data = json_decode(file_get_contents("https://forced.argon.minteck.org/api/get_list.php"), true);
$views = json_decode(file_get_contents("/mnt/argon-cdn/3pad/data.json"), true);
if (str_starts_with($_GET['_'], ":")) {
diff --git a/_frame/library/index.php b/_frame/library/index.php
new file mode 100644
index 0000000..e3d14fc
--- /dev/null
+++ b/_frame/library/index.php
@@ -0,0 +1,38 @@
+<?php $root = $_SERVER['DOCUMENT_ROOT']; ?>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Argon</title>
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+ <link rel="stylesheet" href="/css/fonts.css">
+ <link rel="stylesheet" href="/css/general.css">
+ <link rel="stylesheet" href="/css/header.css">
+ <link rel="stylesheet" href="/css/frame-home.css">
+ <link rel="stylesheet" href="/css/frame.css">
+ <meta name="HandheldFriendly" content="true" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+</head>
+<body>
+<div id="argon-frame">
+ <div id="frame-header">
+ Home
+ </div>
+ <div id="frame-contents">
+ <div id="frame-home-intro">
+ <img src="/logo/512.png" id="frame-home-logo">
+ <div id="frame-home-welcome">Welcome to the Argon Media Platform!</div>
+ <div id="frame-home-tagline">High quality ad-free music from Minteck</div>
+ <button onclick="location.href='/_frame/library';" id="frame-home-button">Browse Library</button>
+ <div id="frame-home-links">
+ <a onclick="location.href='/_frame/about';" id="frame-home-link-about" class="frame-home-link">About Argon</a>
+ ·
+ <a onclick="location.href='/_frame/settings';" id="frame-home-link-settings" class="frame-home-link">Preferences</a>
+ ·
+ <a onclick="window.open('https://gitlab.minteck.org/explore/projects/topics/Argon');" id="frame-home-link-source" class="frame-home-link">Source Code</a>
+ </div>
+ </div>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/_frame/library/main.php b/_frame/library/main.php
new file mode 100644
index 0000000..456838f
--- /dev/null
+++ b/_frame/library/main.php
@@ -0,0 +1,59 @@
+<?php $root = $_SERVER['DOCUMENT_ROOT']; ?>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Argon</title>
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+ <link rel="stylesheet" href="/css/fonts.css">
+ <link rel="stylesheet" href="/css/general.css">
+ <link rel="stylesheet" href="/css/header.css">
+ <link rel="stylesheet" href="/css/frame-library.css">
+ <link rel="stylesheet" href="/css/frame.css">
+ <meta name="HandheldFriendly" content="true" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+</head>
+<body>
+<div id="argon-frame">
+ <div id="frame-header">
+ Library
+ </div>
+ <div id="frame-contents">
+ <?php $data = json_decode(file_get_contents("https://argon.minteck.org/api/get_list.php"), true); ?>
+ <div id="frame-library-listing">
+ <?php foreach ($data["listing"] as $item): ?>
+ <div onclick="if (!event.target.classList.contains('frame-library-item-part-song')) location.href='/_frame/library/<?= $item["_id"] ?>';" class="frame-library-item" id="frame-library-item--<?= $item["_type"] . "-" . $item["_id"] ?>">
+ <div class="frame-library-item-inner">
+ <div class="frame-library-item-cover">
+ <img alt="Album art" class="frame-library-item-cover-inner" src="/api/get_image.php?_=<?= $item["_id"] ?>">
+ </div>
+ <div class="frame-library-item-text">
+ <div class="frame-library-item-text-inner">
+ <div class="frame-library-item-text-title"><?= $item["name"] ?></div>
+ <div class="frame-library-item-text-info"><?= $item["author"] ?> · <?= substr($item["release"], 0, 4); ?></div>
+ <?php if ($item["_type"] === "song"): ?>
+ <div class="frame-library-item-text-original"><?= $item["original"] === null ? "Original Content" : "original by " . $item["original"] ?></div>
+ <?php else: ?>
+ <div class="frame-library-item-text-original"><?= count($item["songs"]) ?> tracks</div>
+ <?php endif; ?>
+ </div>
+ </div>
+ </div>
+ <?php if ($item["_type"] === "set"): ?>
+ <div class="frame-library-item-set">
+ <?php foreach ($item["songs"] as $index => $song): ?>
+ <div onclick="location.href='/_frame/library/<?= $song["_id"] ?>';" class="frame-library-item-set-song frame-library-item-part-song" id="frame-library-item-set-song--<?= $item["_id"] ?>--<?= $song["_id"] ?>">
+ <div class="frame-library-item-set-song-cover frame-library-item-part-song">
+ <img alt="Album art" class="frame-library-item-set-song-cover-inner frame-library-item-part-song" src="/api/get_image.php?_=<?= $song["_id"] ?>"></div>
+ <div class="frame-library-item-set-song-title frame-library-item-part-song"><?= $song["name"] ?></div>
+ </div>
+ <?php endforeach; ?>
+ </div>
+ <?php endif; ?>
+ </div>
+ <?php endforeach; ?>
+ </div>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/_frame/settings/index.php b/_frame/settings/index.php
index 2b3e840..bf828f9 100644
--- a/_frame/settings/index.php
+++ b/_frame/settings/index.php
@@ -21,24 +21,35 @@
<?= l("Preferences", "Préférences") ?>
</div>
<div id="frame-contents">
+ <?php
+
+ $supportsELACpl = true;
+ if (str_contains($_SERVER['HTTP_USER_AGENT'], "Safari/") && !str_contains($_SERVER['HTTP_USER_AGENT'], "Chrome/")) {
+ $supportsELACpl = false;
+ }
+
+ ?>
<?= l("Audio Quality", "Qualité audio") ?><br>
<select onchange="localStorage.setItem('quality', document.getElementById('frame-settings-quality').value); document.getElementById('frame-settings-quality-warning').style.display = document.getElementById('frame-settings-quality').value !== '0' ? '' : 'none'" id="frame-settings-quality">
- <optgroup label="<?= l("Recommended Settings", "Paramètres recommendés") ?>">
+ <optgroup label="<?= l("Recommended Settings", "Paramètres recommandés") ?>">
<option value="0"><?= l("Automatically depending on network (recommended)", "Automatiquement selon le réseau (recommandé)") ?></option>
- <option value="2"><?= l("Original audio quality", "Qualité audio originale") ?></option>
+ <option value="2"<?= $supportsELACpl ? "" : " disabled" ?>><?= l("Original audio quality", "Qualité audio originale") ?> (ELAC Physical Lossless)</option>
</optgroup>
<optgroup label="<?= l("Advanced", "Avancé") ?>">
- <option value="1:ultrahighpcm"><?= l("Highest quality", "Qualité la plus haute") ?> (<?= l("CBR", "constant") ?> 460<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
- <option value="1:veryhigh"><?= l("Higher quality", "Qualité plus haute") ?> (<?= l("CBR", "constant") ?> 320<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
- <option value="1:high"><?= l("High quality", "Haute qualité") ?> (<?= l("VBR", "variable") ?> 245<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
- <option value="1:medium"><?= l("Medium quality", "Qualité moyenne") ?> (<?= l("VBR", "variable") ?> 175<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
- <option value="1:low"><?= l("Low quality", "Basse qualité") ?> (<?= l("VBR", "variable") ?> 130<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
- <option value="1:verylow"><?= l("Slightly lower quality", "Qualité légèrement plus basse") ?> (<?= l("VBR", "variable") ?> 100<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
- <option value="1:ultralow"><?= l("Lower quality", "Qualité plus basse") ?> (<?= l("VBR", "variable") ?> 85<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
- <option value="1:superlow"><?= l("Lowest quality", "Qualité la plus basse") ?> (<?= l("VBR", "variable") ?> 65<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
+ <option value="1:ultrahigh"<?= $supportsELACpl ? "" : " disabled" ?>><?= l("Highest quality", "Qualité la plus haute") ?> (ELAC-PL 460<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
+ <option value="1:veryhigh"><?= l("Higher quality", "Qualité plus haute") ?> (ELAC-EL 320<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
+ <option value="1:high"><?= l("High quality", "Haute qualité") ?> (ELAC-EL 245<?= l("kbps", " ko/s") ?>, 32<?= l("bit", " bits") ?>)</option>
+ <option value="1:medium"><?= l("Medium quality", "Qualité moyenne") ?> (ELAC-EL 175<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
+ <option value="1:low"><?= l("Low quality", "Basse qualité") ?> (ELAC-EL 130<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
+ <option value="1:verylow"><?= l("Slightly lower quality", "Qualité légèrement plus basse") ?> (ELAC-EL 100<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
+ <option value="1:ultralow"><?= l("Lower quality", "Qualité plus basse") ?> (ELAC-EL 85<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
+ <option value="1:superlow"><?= l("Lowest quality", "Qualité la plus basse") ?> (ELAC-EL 65<?= l("kbps", " ko/s") ?>, 16<?= l("bit", " bits") ?>)</option>
</optgroup>
</select>
<div id="frame-settings-quality-warning" style="display:none;"><?= l("Using another audio quality setting than the default one may lead to audio not playing continuously due to low Internet connection or poor performance.", "Utiliser une autre option de qualité audio que celle par défaut peut empêcher l'audio d'être lu en continu en raison d'une mauvaise performance réseau ou système.") ?></div>
+ <?php if (!$supportsELACpl): ?>
+ <div id="frame-settings-unsupported-warning"><?= l("This browser does not support playing ELAC Physical Lossless audio.", "Ce navigateur ne supporte pas les lectures de flux ELAC Physical Lossless.") ?></div>
+ <?php endif; ?>
</div>
<script>