kinda works
This commit is contained in:
parent
dfac4c5f2b
commit
6be02711a0
1 changed files with 13 additions and 10 deletions
|
@ -67,7 +67,7 @@
|
||||||
</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()">
|
<div class="metainfo" style="min-width: 70px;" v-if="isLoved">
|
||||||
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
|
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="metainfo">
|
<div class="metainfo">
|
||||||
|
@ -101,7 +101,8 @@
|
||||||
displayDuration: true,
|
displayDuration: true,
|
||||||
addClasses: {},
|
addClasses: {},
|
||||||
itemId: 0,
|
itemId: 0,
|
||||||
isLibrary: false
|
isLibrary: false,
|
||||||
|
isLoved: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -124,6 +125,9 @@
|
||||||
} else {
|
} else {
|
||||||
this.itemId = this.item.id;
|
this.itemId = this.item.id;
|
||||||
}
|
}
|
||||||
|
if (this.item.attributes.playParams) {
|
||||||
|
this.getHeartStatus();
|
||||||
|
}
|
||||||
let duration = this.item.attributes.durationInMillis ?? 0
|
let duration = this.item.attributes.durationInMillis ?? 0
|
||||||
if (duration == 0 || !this.showDuration) {
|
if (duration == 0 || !this.showDuration) {
|
||||||
this.displayDuration = false
|
this.displayDuration = false
|
||||||
|
@ -504,14 +508,13 @@
|
||||||
},
|
},
|
||||||
async getHeartStatus() {
|
async getHeartStatus() {
|
||||||
try {
|
try {
|
||||||
let rating = await app.getRating(this.item)
|
await app.getRating(this.item).then(res => {
|
||||||
if (rating == 1) {
|
if (res == 1) {
|
||||||
console.log(this.item.attributes.name + " checked for heart status! Response: true")
|
this.isLoved = true
|
||||||
return true;
|
} else {
|
||||||
} else {
|
this.isLoved = false
|
||||||
console.log(this.item.attributes.name + " checked for heart status! Response: false")
|
}
|
||||||
return false;
|
})
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue