From 60221d5e01045e3e1c985bd7cd91d079c5dcac9c Mon Sep 17 00:00:00 2001 From: vapormusic Date: Mon, 20 Dec 2021 09:04:04 +0700 Subject: [PATCH] some fixes --- src/renderer/index.js | 7 +++++-- src/renderer/views/components/mediaitem-list-item.ejs | 2 +- src/renderer/views/components/mediaitem-square-large.ejs | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/renderer/index.js b/src/renderer/index.js index 1a743a6a..e2f404b7 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -1554,8 +1554,11 @@ const app = new Vue({ console.log(truekind,id) try { - if (parent == "librarysongs"){ - console.log("asc") + if (app.library.songs.listing.length > childIndex && parent == "librarysongs"){ + console.log(item) + if (item && ((app.library.songs.listing[childIndex].id != item.id))){ + childIndex = app.library.songs.listing.indexOf(item) + } let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item)); this.mk.clearQueue().then(function (_) { app.mk.queue.append(query) diff --git a/src/renderer/views/components/mediaitem-list-item.ejs b/src/renderer/views/components/mediaitem-list-item.ejs index e4aebf2d..dfc17b76 100644 --- a/src/renderer/views/components/mediaitem-list-item.ejs +++ b/src/renderer/views/components/mediaitem-list-item.ejs @@ -259,7 +259,7 @@ let childIndex = this.index console.log(item,parent,childIndex) if (parent != null && childIndex != null) { - app.queueParentandplayChild(parent, childIndex); + app.queueParentandplayChild(parent, childIndex, item); } else { app.playMediaItemById(item.attributes.playParams.id ?? item.id, item.attributes.playParams.kind ?? item.type, item.attributes.playParams.isLibrary ?? false, item.attributes.url) } diff --git a/src/renderer/views/components/mediaitem-square-large.ejs b/src/renderer/views/components/mediaitem-square-large.ejs index ea1b7c33..0eb21cb8 100644 --- a/src/renderer/views/components/mediaitem-square-large.ejs +++ b/src/renderer/views/components/mediaitem-square-large.ejs @@ -17,7 +17,7 @@ :style="[(!(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ? {'margin': '140px','position': 'absolute', width: '40px', height: '40px',} : - {margin: '35px', 'position': 'absolute','position': 'absolute', + {margin: '35px', 'position': 'absolute', width: '120px', height: '120px',}]" @click="app.playMediaItem(item)"> <%- include("../svg/play.svg") %>