Aktualizovat content.js
This commit is contained in:
@@ -24,8 +24,8 @@ function extractAndSendSong() {
|
|||||||
const progressFull = `${currentTime}/${duration}`;
|
const progressFull = `${currentTime}/${duration}`;
|
||||||
|
|
||||||
if (songTitle) {
|
if (songTitle) {
|
||||||
// Vytvoříme podpis, abychom posílali data buď při změně písničky, nebo každou vteřinu kvůli posunu času
|
// Opraveno z artistTitle na artistName
|
||||||
const currentSignature = `${artistTitle}-${songTitle}-${currentTime}`;
|
const currentSignature = `${artistName}-${songTitle}-${currentTime}`;
|
||||||
|
|
||||||
if (currentSignature !== lastSentSignature) {
|
if (currentSignature !== lastSentSignature) {
|
||||||
lastSentSignature = currentSignature;
|
lastSentSignature = currentSignature;
|
||||||
@@ -41,7 +41,7 @@ function extractAndSendSong() {
|
|||||||
artist: artistName,
|
artist: artistName,
|
||||||
title: songTitle,
|
title: songTitle,
|
||||||
coverImg: albumCoverUrl,
|
coverImg: albumCoverUrl,
|
||||||
progressTime: progressFull, // Bude obsahovat např. "0:53/3:45"
|
progressTime: progressFull,
|
||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user