This commit is contained in:
booploops 2021-12-20 19:52:53 -08:00
commit 3545a5111e
2 changed files with 5 additions and 1 deletions

View file

@ -1552,18 +1552,22 @@ const app = new Vue({
if (item && ((app.library.songs.listing[childIndex].id != item.id))){
childIndex = app.library.songs.listing.indexOf(item)
}
let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item));
try{app.mk.stop()}catch(e){}
this.mk.clearQueue().then(function (_) {
app.mk.queue.append(query)
app.mk.changeToMediaAtIndex(childIndex)
})
} else {
try{app.mk.stop()}catch(e){}
this.mk.setQueue({[truekind]: [id]}).then(function (queue) {
app.mk.changeToMediaAtIndex(childIndex)
})
}
} catch (err) {
console.log(err)
try{app.mk.stop()}catch(e){}
this.playMediaItemById(item.attributes.playParams.id ?? item.id, item.attributes.playParams.kind ?? item.type, item.attributes.playParams.isLibrary ?? false, item.attributes.url)
}

View file

@ -118,7 +118,7 @@
if (app.currentLyricsLine != i) {
app.currentLyricsLine = i;
if (app.lyricon && app.drawer.open && this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`)) {
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`).classList.remove("active");
if(this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`)) {this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`).classList.remove("active");}
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).classList.add("active")
if (checkIfScrollIsStatic) {
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).scrollIntoView({