fix context menu not working
This commit is contained in:
parent
dd5ee599f5
commit
ae273da54c
1 changed files with 4 additions and 2 deletions
|
@ -1379,7 +1379,9 @@ const app = new Vue({
|
||||||
case "album":
|
case "album":
|
||||||
let albumId = '';
|
let albumId = '';
|
||||||
try {
|
try {
|
||||||
if (item.relationships.albums && item.relationships.albums.data.length > 0 && !item.relationships.albums.data[0].type.includes("library")) {
|
if((item.type ?? item.playParams?.kind ?? "") == "albums" ){
|
||||||
|
albumId = item.id ?? ""
|
||||||
|
} else if (item.relationships.albums && item.relationships.albums.data.length > 0 && !item.relationships.albums.data[0].type.includes("library")) {
|
||||||
if (item.relationships.albums.data[0].type === "album" || item.relationships.albums.data[0].type === "albums") {
|
if (item.relationships.albums.data[0].type === "album" || item.relationships.albums.data[0].type === "albums") {
|
||||||
albumId = item.relationships.albums.data[0].id
|
albumId = item.relationships.albums.data[0].id
|
||||||
}
|
}
|
||||||
|
@ -1395,7 +1397,7 @@ const app = new Vue({
|
||||||
|
|
||||||
if (albumId == "") {
|
if (albumId == "") {
|
||||||
try {
|
try {
|
||||||
let albumQuery = (await app.mk.api.v3.music(`v1/catalog/${app.mk.storefrontId}/search?term=${item.attributes.albumName + " " + (item.attributes.artistName ?? "")}`, {
|
let albumQuery = (await app.mk.api.v3.music(`v1/catalog/${app.mk.storefrontId}/search?term=${(item.attributes.albumName ?? item.attributes.name ?? "" )+ " " + (item.attributes.artistName ?? "")}`, {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
types: 'albums'
|
types: 'albums'
|
||||||
})).data.results;
|
})).data.results;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue