feat: redesign main page, get player working (mostly) with Apple Music source

This commit is contained in:
2026-09-01 18:16:11 +02:00
parent faa271edd6
commit 01526034ce
29 changed files with 425 additions and 219 deletions
+6 -2
View File
@@ -24,12 +24,15 @@ export const startTracking = () => {
}
duration.value = sources[currentSource.value]?.getDuration() ?? -1;
setTimeout( () => {
duration.value = sources[currentSource.value]?.getDuration() ?? -1;
}, 2000 );
};
const tracker = () => {
playbackPercentage.value = sources[currentSource.value]?.getPlaybackPos() ?? -1;
if ( playbackPercentage.value > duration.value ) {
if ( playbackPercentage.value > 0.995 && duration.value > 0 ) {
if ( repeat.value === 'one' ) {
sources[currentSource.value]?.seekTo( 0 );
} else {
@@ -42,8 +45,9 @@ const tracker = () => {
export const stopTracking = () => {
try {
clearInterval( interval );
interval = -1;
} catch {
// empty
}
interval = -1;
};