added add to playlist to playlists and albums
This commit is contained in:
parent
747be8849b
commit
93c24a2a38
3 changed files with 39 additions and 29 deletions
|
@ -1,5 +1,4 @@
|
||||||
<script type="text/x-template" id="add-to-playlist">
|
<script type="text/x-template" id="add-to-playlist">
|
||||||
<template>
|
|
||||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()" @contextmenu.self="app.resetState()">
|
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()" @contextmenu.self="app.resetState()">
|
||||||
<div class="modal-window">
|
<div class="modal-window">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -63,10 +63,13 @@
|
||||||
}
|
}
|
||||||
let playlistMap = this.$root.playlists.trackMapping
|
let playlistMap = this.$root.playlists.trackMapping
|
||||||
if (this.relateMediaItems.length != 0) {
|
if (this.relateMediaItems.length != 0) {
|
||||||
|
if (playlistMap[this.relateMediaItems[0]]) {
|
||||||
if (playlistMap[this.relateMediaItems[0]].includes(this.item.id)) {
|
if (playlistMap[this.relateMediaItems[0]].includes(this.item.id)) {
|
||||||
this.hasRelatedMediaItems = true
|
this.hasRelatedMediaItems = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
|
|
|
@ -483,6 +483,15 @@
|
||||||
|
|
||||||
let menuItems = {
|
let menuItems = {
|
||||||
items: {
|
items: {
|
||||||
|
"addToPlaylist": {
|
||||||
|
name: app.getLz('action.addToPlaylist'),
|
||||||
|
"icon": "./assets/feather/list.svg",
|
||||||
|
action: () => {
|
||||||
|
app.selectedMediaItems = []
|
||||||
|
app.select_selectMediaItem(this.data.attributes.playParams.id ?? this.data.id, this.data.attributes.playParams.kind ?? this.data.type, 0, 0, this.data.attributes.playParams.isLibrary ?? false)
|
||||||
|
app.promptAddToPlaylist()
|
||||||
|
}
|
||||||
|
},
|
||||||
"share": {
|
"share": {
|
||||||
name: app.getLz('term.share'),
|
name: app.getLz('term.share'),
|
||||||
icon: "./assets/feather/share.svg",
|
icon: "./assets/feather/share.svg",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue