fix playlist queueing
This commit is contained in:
parent
b0084e386a
commit
579a479fce
3 changed files with 29 additions and 10 deletions
|
@ -731,7 +731,7 @@ const app = new Vue({
|
|||
console.log(kind, id, isLibrary)
|
||||
|
||||
if (true) {
|
||||
if (kind == "playlist") {
|
||||
if (kind.includes("playlist") || kind.includes("album") || kind.toString().includes("apple-curator")) {
|
||||
app.showingPlaylist = [];
|
||||
}
|
||||
if (kind.toString().includes("apple-curator")) {
|
||||
|
@ -1732,7 +1732,14 @@ const app = new Vue({
|
|||
}
|
||||
this.mk.clearQueue().then(function (_) {
|
||||
app.mk.queue.append(query)
|
||||
app.mk.changeToMediaAtIndex(childIndex)
|
||||
if (childIndex != -1) {
|
||||
app.mk.changeToMediaAtIndex(childIndex)
|
||||
} else if (item) {
|
||||
app.mk.playNext({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function(){
|
||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1)
|
||||
app.mk.play()
|
||||
})
|
||||
} else {app.mk.play()}
|
||||
})
|
||||
} else {
|
||||
try {
|
||||
|
@ -1740,7 +1747,17 @@ const app = new Vue({
|
|||
} catch (e) {
|
||||
}
|
||||
this.mk.setQueue({[truekind]: [id]}).then(function (queue) {
|
||||
app.mk.changeToMediaAtIndex(childIndex)
|
||||
if (item && ((queue._itemIDs[childIndex] != item.id))) {
|
||||
childIndex = queue._itemIDs.indexOf(item.id)
|
||||
}
|
||||
if (childIndex != -1) {
|
||||
app.mk.changeToMediaAtIndex(childIndex)
|
||||
} else if (item) {
|
||||
app.mk.playNext({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function(){
|
||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1)
|
||||
app.mk.play()
|
||||
})
|
||||
} else {app.mk.play()}
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
<div @click.self='app.routeView(item)'
|
||||
class="cd-mediaitem-mvview">
|
||||
<div class="title-browse-sp bold " @click='app.routeView(item)'>
|
||||
{{ badge ? badge.designBadge : ""}}
|
||||
{{ badge ? badge.designBadge : '⠀ '}}
|
||||
</div>
|
||||
<div class="title-browse-sp " >
|
||||
{{ (badge != null && badge.designTag != null) ? badge.designTag : (item.attributes.name ?? '') }}
|
||||
{{ (badge != null && badge.designTag != null) ? badge.designTag : (item.attributes.name ?? '⠀ ') }}
|
||||
</div>
|
||||
<div class="title-browse-sp semibold" v-if="!(badge != null && badge.designTag != null)" >
|
||||
{{ (item.attributes.artistName ?? (item.attributes.curatorName ?? '')) }}
|
||||
<div class="title-browse-sp semibold" >
|
||||
{{ (item.attributes.artistName ?? (item.attributes.curatorName ?? '⠀ ')) }}
|
||||
</div>
|
||||
<div class="artwork">
|
||||
<mediaitem-artwork
|
||||
|
|
|
@ -98,11 +98,13 @@
|
|||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.isInLibrary()
|
||||
this.$nextTick(function () {
|
||||
this.isInLibrary()
|
||||
})
|
||||
},
|
||||
watch:{
|
||||
data : function() {
|
||||
this.isInLibrary()
|
||||
data: function () {
|
||||
this.isInLibrary()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue