added add to playlist to playlists and albums

This commit is contained in:
booploops 2022-04-20 21:55:05 -07:00
parent 747be8849b
commit 93c24a2a38
3 changed files with 39 additions and 29 deletions

View file

@ -1,5 +1,4 @@
<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-window">
<div class="modal-header">
@ -30,7 +29,6 @@
</div>
</div>
</div>
</template>
</script>
<script>

View file

@ -63,10 +63,13 @@
}
let playlistMap = this.$root.playlists.trackMapping
if (this.relateMediaItems.length != 0) {
if (playlistMap[this.relateMediaItems[0]]) {
if (playlistMap[this.relateMediaItems[0]].includes(this.item.id)) {
this.hasRelatedMediaItems = true
}
}
}
},
methods: {
clickEvent() {

View file

@ -483,6 +483,15 @@
let menuItems = {
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": {
name: app.getLz('term.share'),
icon: "./assets/feather/share.svg",