From 58a516fa86a5c07062c22c027be0ca70cef6d344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= Date: Mon, 1 Apr 2024 14:39:19 +0200 Subject: [PATCH] update --- front-example/player.css | 3 ++- front-example/player.js | 9 ++++----- user/music-exp.plist | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/front-example/player.css b/front-example/player.css index 9120e73..da2674f 100644 --- a/front-example/player.css +++ b/front-example/player.css @@ -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 { diff --git a/front-example/player.js b/front-example/player.js index 2fecea7..add0a67 100644 --- a/front-example/player.js +++ b/front-example/player.js @@ -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; diff --git a/user/music-exp.plist b/user/music-exp.plist index 01c5cbb..fcd31a4 100644 --- a/user/music-exp.plist +++ b/user/music-exp.plist @@ -8,7 +8,6 @@ am.noh.music-exp ProgramArguments - /Users/noham/miniconda3/envs/310/bin/python export.py @@ -19,6 +18,6 @@ StandardErrorPath error_logfile.log WorkingDirectory - /Users/noham/Documents/GitHub/AppleMusicApi/user + /Users/noham/Documents/GitHub/AM-Exporter/user