Auto commit: 2026-02-17T22:42:46.185Z

This commit is contained in:
Flatlogic Bot 2026-02-17 22:42:46 +00:00
parent 39ef6459d5
commit 6be3a97820

View File

@ -3118,6 +3118,20 @@ $twitter_link = "https://twitter.com/";
if (coverPlaceholder) coverPlaceholder.style.display = 'none';
trackCover.style.opacity = '1';
// Save to recent tracks if changed
const currentTrackFull = `${artist} - ${title}`;
if (recentTracks.length === 0 || recentTracks[0].title !== currentTrackFull) {
const newTrack = {
title: currentTrackFull,
cover: coverUrl,
likes: 0
};
recentTracks.unshift(newTrack);
if (recentTracks.length > 6) recentTracks.pop();
localStorage.setItem('recentTracks', JSON.stringify(recentTracks));
renderRecentTracks();
}
fetch('api/record_history.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@ -3219,17 +3233,19 @@ $twitter_link = "https://twitter.com/";
}
}
// Initial fetch
updateMetadata();
fetchTopSongs();
fetchGallery();
fetchLeaderboard();
// Update cycles
setInterval(updateMetadata, 30000);
setInterval(fetchTopSongs, 60000);
setInterval(fetchGallery, 3000); // Frecuencia aumentada para fotos efímeras (5s)
setInterval(fetchLeaderboard, 60000);
setInterval(fetchUpcomingTracks, 30000);
// Initial fetch
updateMetadata();
fetchTopSongs();
fetchGallery();
fetchLeaderboard();
fetchUpcomingTracks();
// Theme Toggle Functionality
function toggleTheme() {