This commit is contained in:
Amaru8 2022-04-29 21:44:15 +02:00
parent c9a5fc546f
commit f403b52af1
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>

After

Width:  |  Height:  |  Size: 379 B

View file

@ -67,6 +67,9 @@
</div> </div>
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"></div> <div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"></div>
<template v-if="showMetaData == true" @dblclick="route()"> <template v-if="showMetaData == true" @dblclick="route()">
<div class="metainfo" style="min-width: 70px;" v-if="getHeartStatus(item)">
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
</div>
<div class="metainfo"> <div class="metainfo">
{{ item.attributes.releaseDate ? new Date(item.attributes.releaseDate).toLocaleDateString() {{ item.attributes.releaseDate ? new Date(item.attributes.releaseDate).toLocaleDateString()
: "" }} : "" }}
@ -499,6 +502,20 @@
visibilityChanged: function (isVisible, entry) { visibilityChanged: function (isVisible, entry) {
this.isVisible = isVisible this.isVisible = isVisible
}, },
async getHeartStatus(item) {
try {
let rating = await app.getRating(item)
if (rating == 1) {
console.log(item.attributes.name + " checked for heart status! Response: true")
return true;
} else {
console.log(item.attributes.name + " checked for heart status! Response: false")
return false;
}
} catch (err) {
console.log(err)
}
},
addToLibrary() { addToLibrary() {
let item = this.item let item = this.item
if (item.attributes.playParams.id) { if (item.attributes.playParams.id) {