mirror of
https://github.com/NohamR/AM-Exporter.git
synced 2026-05-25 04:07:11 +00:00
update
This commit is contained in:
@@ -75,7 +75,7 @@ body * {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.player h1 {
|
.player h1 {
|
||||||
font-size: 27px;
|
font-size: 22px;
|
||||||
color: #E1E1E6;
|
color: #E1E1E6;
|
||||||
padding-bottom: 7px;
|
padding-bottom: 7px;
|
||||||
}
|
}
|
||||||
@@ -110,6 +110,7 @@ body * {
|
|||||||
display: block;
|
display: block;
|
||||||
background: var(--new-color);
|
background: var(--new-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
transition: width 1s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function textColorOnBackground(rgb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fetchDataAndAnimate() {
|
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(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
const artist = data.artist;
|
const artist = data.artist;
|
||||||
@@ -40,7 +40,6 @@ function fetchDataAndAnimate() {
|
|||||||
totalTime.style.color = textColor;
|
totalTime.style.color = textColor;
|
||||||
|
|
||||||
const titleSongElement = document.querySelector('.title-song');
|
const titleSongElement = document.querySelector('.title-song');
|
||||||
// titleSongElement.textContent = name;
|
|
||||||
titleSongElement.textContent = `${name} - `
|
titleSongElement.textContent = `${name} - `
|
||||||
titleSongElement.style.color = textColor;
|
titleSongElement.style.color = textColor;
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ function fetchDataAndAnimate() {
|
|||||||
element.href = itunes_url;
|
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');
|
const totaltimeElement = document.querySelector('.total-time');
|
||||||
totaltimeElement.textContent = 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');
|
const totaltimeElement = document.querySelector('.total-time');
|
||||||
totaltimeElement.textContent = time;
|
totaltimeElement.textContent = time;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<string>am.noh.music-exp</string>
|
<string>am.noh.music-exp</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<array>
|
<array>
|
||||||
<!-- <string>/usr/bin/python3</string> -->
|
|
||||||
<string>/Users/noham/miniconda3/envs/310/bin/python</string>
|
<string>/Users/noham/miniconda3/envs/310/bin/python</string>
|
||||||
<string>export.py</string>
|
<string>export.py</string>
|
||||||
</array>
|
</array>
|
||||||
@@ -19,6 +18,6 @@
|
|||||||
<key>StandardErrorPath</key>
|
<key>StandardErrorPath</key>
|
||||||
<string>error_logfile.log</string>
|
<string>error_logfile.log</string>
|
||||||
<key>WorkingDirectory</key>
|
<key>WorkingDirectory</key>
|
||||||
<string>/Users/noham/Documents/GitHub/AppleMusicApi/user</string>
|
<string>/Users/noham/Documents/GitHub/AM-Exporter/user</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user