playlist sorting, remove from playlist added

This commit is contained in:
booploops 2021-12-22 00:39:02 -08:00
parent b0ceec8533
commit 9e4f3015f0
3 changed files with 75 additions and 3 deletions

View file

@ -2,6 +2,7 @@
<template v-if="type == 'artists'">
<div class="mediaitem-artwork rounded" :key="url" :style="getStyle()">
<img :src="app.getMediaItemArtwork(url, size)"
loading="lazy" decoding="async"
class="mediaitem-artwork--img">
</div>
</template>
@ -9,6 +10,7 @@
<div class="mediaitem-artwork" :key="url" :style="getStyle()"
v-observe-visibility="{callback: visibilityChanged}">
<img :src="app.getMediaItemArtwork(url, size)" v-if="isVisible"
loading="lazy" decoding="async"
class="mediaitem-artwork--img">
<div v-if="video && isVisible" class="animatedartwork-view-box">
<animatedartwork-view :video="video"></animatedartwork-view>

View file

@ -4,7 +4,7 @@
@contextmenu="contextMenu"
@click="select"
:data-id="item.attributes.playParams.id ?? item.id"
:data-type="item.attributes.playParams.kind ?? item.type"
:data-type="item.type ?? item.attributes.playParams.kind"
:data-index="index"
:data-guid="guid"
class="cd-mediaitem-list-item"
@ -81,6 +81,7 @@
'show-library-status': {type: Boolean, default: true},
'show-meta-data': {type: Boolean, default: false},
'show-duration': {type: Boolean, default: true},
'contextExt': {type: Object, required: false},
},
methods: {
select(e) {
@ -236,6 +237,15 @@
]
}
}
if(this.contextExt) {
// if this.context-ext.normal is true append all options to the 'normal' menu which is a kvp of arrays
if(this.contextExt.normal) {
menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
}
if(this.contextExt.multiple) {
menus.multiple.items = menus.multiple.items.concat(this.contextExt.multiple)
}
}
CiderContextMenu.Create(event, menus[useMenu])
},
visibilityChanged: function (isVisible, entry) {