more progress on apple music integration

This commit is contained in:
2023-11-16 20:59:31 +01:00
parent 142a835048
commit aa64d07570
4 changed files with 113 additions and 78 deletions

View File

@@ -18,17 +18,19 @@ createApp( {
computed: {
songQueue() {
let ret = [];
let pos = 0;
for ( let song in this.songs ) {
if ( parseInt( song ) >= this.queuePos ) {
if ( pos >= this.queuePos ) {
ret.push( this.songs[ song ] );
}
pos += 1;
}
return ret;
},
getTimeUntil() {
return ( song ) => {
let timeRemaining = 0;
for ( let i = this.queuePos; i < this.songs.length; i++ ) {
for ( let i = this.queuePos; i < Object.keys( this.songs ).length; i++ ) {
if ( this.songs[ i ] == song ) {
break;
}