mirror of
https://github.com/NohamR/AM-Exporter.git
synced 2026-05-24 19:58:34 +00:00
update
This commit is contained in:
@@ -75,7 +75,7 @@ body * {
|
||||
}
|
||||
|
||||
.player h1 {
|
||||
font-size: 27px;
|
||||
font-size: 22px;
|
||||
color: #E1E1E6;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
@@ -110,6 +110,7 @@ body * {
|
||||
display: block;
|
||||
background: var(--new-color);
|
||||
border-radius: 10px;
|
||||
transition: width 1s linear;
|
||||
}
|
||||
|
||||
.time {
|
||||
|
||||
@@ -16,7 +16,7 @@ function textColorOnBackground(rgb) {
|
||||
}
|
||||
|
||||
function fetchDataAndAnimate() {
|
||||
fetch('https://api.noh.am/music/get')
|
||||
fetch('https://api.noh.am/music/get') // récupère les données depuis l'API
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const artist = data.artist;
|
||||
@@ -40,7 +40,6 @@ function fetchDataAndAnimate() {
|
||||
totalTime.style.color = textColor;
|
||||
|
||||
const titleSongElement = document.querySelector('.title-song');
|
||||
// titleSongElement.textContent = name;
|
||||
titleSongElement.textContent = `${name} - `
|
||||
titleSongElement.style.color = textColor;
|
||||
|
||||
@@ -67,7 +66,7 @@ function fetchDataAndAnimate() {
|
||||
element.href = itunes_url;
|
||||
});
|
||||
|
||||
if (status === 'playing' && (pPosition / duration) * 100 <= 100) {
|
||||
if (status === 'playing' && (pPosition / duration) * 100 <= 100) { // actualise une première fois
|
||||
const totaltimeElement = document.querySelector('.total-time');
|
||||
totaltimeElement.textContent = time;
|
||||
|
||||
@@ -101,9 +100,9 @@ function fetchDataAndAnimate() {
|
||||
}
|
||||
}
|
||||
|
||||
intervalId = setInterval(updateProgress, 1000);
|
||||
intervalId = setInterval(updateProgress, 1000); // actualise le compteur toutes les secondes
|
||||
}
|
||||
else {
|
||||
else { // si le lecteur ne joue rien alors il affiche la dernière musique jouée
|
||||
const totaltimeElement = document.querySelector('.total-time');
|
||||
totaltimeElement.textContent = time;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<string>am.noh.music-exp</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<!-- <string>/usr/bin/python3</string> -->
|
||||
<string>/Users/noham/miniconda3/envs/310/bin/python</string>
|
||||
<string>export.py</string>
|
||||
</array>
|
||||
@@ -19,6 +18,6 @@
|
||||
<key>StandardErrorPath</key>
|
||||
<string>error_logfile.log</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/Users/noham/Documents/GitHub/AppleMusicApi/user</string>
|
||||
<string>/Users/noham/Documents/GitHub/AM-Exporter/user</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user