Merge branch 'main' of https://github.com/ciderapp/Cider
This commit is contained in:
commit
3545a5111e
2 changed files with 5 additions and 1 deletions
|
@ -1552,18 +1552,22 @@ const app = new Vue({
|
||||||
if (item && ((app.library.songs.listing[childIndex].id != item.id))){
|
if (item && ((app.library.songs.listing[childIndex].id != item.id))){
|
||||||
childIndex = app.library.songs.listing.indexOf(item)
|
childIndex = app.library.songs.listing.indexOf(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item));
|
let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item));
|
||||||
|
try{app.mk.stop()}catch(e){}
|
||||||
this.mk.clearQueue().then(function (_) {
|
this.mk.clearQueue().then(function (_) {
|
||||||
app.mk.queue.append(query)
|
app.mk.queue.append(query)
|
||||||
app.mk.changeToMediaAtIndex(childIndex)
|
app.mk.changeToMediaAtIndex(childIndex)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
try{app.mk.stop()}catch(e){}
|
||||||
this.mk.setQueue({[truekind]: [id]}).then(function (queue) {
|
this.mk.setQueue({[truekind]: [id]}).then(function (queue) {
|
||||||
app.mk.changeToMediaAtIndex(childIndex)
|
app.mk.changeToMediaAtIndex(childIndex)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(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)
|
this.playMediaItemById(item.attributes.playParams.id ?? item.id, item.attributes.playParams.kind ?? item.type, item.attributes.playParams.isLibrary ?? false, item.attributes.url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
if (app.currentLyricsLine != i) {
|
if (app.currentLyricsLine != i) {
|
||||||
app.currentLyricsLine = i;
|
app.currentLyricsLine = i;
|
||||||
if (app.lyricon && app.drawer.open && this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${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")
|
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).classList.add("active")
|
||||||
if (checkIfScrollIsStatic) {
|
if (checkIfScrollIsStatic) {
|
||||||
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).scrollIntoView({
|
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).scrollIntoView({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue