diff --git a/resources/entitlements.mac.plist b/resources/entitlements.mac.plist new file mode 100644 index 00000000..8fff4988 --- /dev/null +++ b/resources/entitlements.mac.plist @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.allow-dyld-environment-variables + + + diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index e3db8bd5..45dc7914 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -37,21 +37,27 @@ const MusicKitInterop = { const remainingTimeExport = MusicKit.getInstance().currentPlaybackTimeRemaining; const attributes = (nowPlayingItem != null ? nowPlayingItem.attributes : {}); - attributes.status = isPlayingExport ? isPlayingExport : false; - attributes.name = attributes.name ? attributes.name : 'No Title Found'; - attributes.artwork = attributes.artwork ? attributes.artwork : {url: ''}; - attributes.artwork.url = attributes.artwork.url ? attributes.artwork.url : ''; - attributes.playParams = attributes.playParams ? attributes.playParams : {id: 'no-id-found'}; - attributes.playParams.id = attributes.playParams.id ? attributes.playParams.id : 'no-id-found'; - attributes.albumName = attributes.albumName ? attributes.albumName : ''; - attributes.artistName = attributes.artistName ? attributes.artistName : ''; - attributes.genreNames = attributes.genreNames ? attributes.genreNames : []; - attributes.remainingTime = remainingTimeExport ? (remainingTimeExport * 1000) : 0; - attributes.durationInMillis = attributes.durationInMillis ? attributes.durationInMillis : 0; + attributes.status = isPlayingExport ?? false; + attributes.name = attributes?.name ?? 'No Title Found'; + attributes.artwork = attributes?.artwork ?? { url: '' }; + attributes.artwork.url = attributes?.artwork?.url ?? ''; + attributes.playParams = attributes?.playParams ?? { id: 'no-id-found' }; + attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found'; + attributes.albumName = attributes?.albumName ?? ''; + attributes.artistName = attributes?.artistName ?? ''; + attributes.genreNames = attributes?.genreNames ?? []; + attributes.remainingTime = remainingTimeExport + ? remainingTimeExport * 1000 + : 0; + attributes.durationInMillis = attributes?.durationInMillis ?? 0; attributes.startTime = Date.now(); - attributes.endTime = Math.round((attributes.playParams.id === cache.playParams.id ? (Date.now() + attributes.remainingTime) : (attributes.startTime + attributes.durationInMillis))); - attributes.endTime = attributes.endTime ? attributes.endTime : Date.now(); - return attributes + attributes.endTime = Math.round( + attributes?.playParams?.id === cache.playParams.id + ? Date.now() + attributes?.remainingTime + : attributes?.startTime + attributes?.durationInMillis + ); + + return attributes; }, filterTrack: function (a, playbackCheck, mediaCheck) { diff --git a/src/renderer/apple-hls.js b/src/renderer/apple-hls.js index a3a3398a..e4936dda 100644 --- a/src/renderer/apple-hls.js +++ b/src/renderer/apple-hls.js @@ -23260,7 +23260,7 @@ } if (null != (l = "string" != typeof (h = g.pathwayID) ? im("invalid steering manifest PATHWAY-PRIORITY list item data type") : /^[\w\-\.]+$/.test(h) ? void 0 : im("steering manifest contains invalid pathway ID: " + h))) break; - if (g.hdcpLevel === "NONE" && (g.url.includes("gr230"))){ + if (g.hdcpLevel === "NONE"){ n.push(g)} } return { diff --git a/src/renderer/assets/explicit.svg b/src/renderer/assets/explicit.svg new file mode 100644 index 00000000..0eeb5dbb --- /dev/null +++ b/src/renderer/assets/explicit.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/src/renderer/assets/repeat.svg b/src/renderer/assets/repeat.svg index 0c283cf4..752848dd 100644 --- a/src/renderer/assets/repeat.svg +++ b/src/renderer/assets/repeat.svg @@ -1,18 +1,20 @@ - - - + + - - + + + + + + diff --git a/src/renderer/assets/spinner.gif b/src/renderer/assets/spinner-old.gif similarity index 100% rename from src/renderer/assets/spinner.gif rename to src/renderer/assets/spinner-old.gif diff --git a/src/renderer/assets/spinner.svg b/src/renderer/assets/spinner.svg new file mode 100644 index 00000000..38e1f9ab --- /dev/null +++ b/src/renderer/assets/spinner.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/renderer/index.js b/src/renderer/index.js index 99760db8..215705f3 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -268,6 +268,7 @@ const app = new Vue({ drawerState: "queue", topChromeVisible: true, progresshover: false, + windowControlPosition: "right" }, collectionList: { response: {}, @@ -362,7 +363,7 @@ const app = new Vue({ case "disabled": document.querySelector("html").style.background = "#222"; document.querySelector("body").classList.add("notransparency") - + // document.querySelector("body").style.background = "#222"; break; } @@ -392,7 +393,7 @@ const app = new Vue({ let ids = res.map(function(i) {return {id:i.id, type: i.type}}) pl_items = pl_items.concat(ids) } else if (self.selectedMediaItems[i].kind == "library-song" || self.selectedMediaItems[i].kind == "library-songs") { - self.selectedMediaItems[i].kind = "library-songs" + self.selectedMediaItems[i].kind = "library-songs" pl_items.push({ id: self.selectedMediaItems[i].id, type: self.selectedMediaItems[i].kind @@ -408,7 +409,7 @@ const app = new Vue({ type: self.selectedMediaItems[i].kind }) } - + } this.modals.addToPlaylist = false this.mk.api.library.appendTracksToPlaylist(playlist_id, pl_items).then(() => { @@ -1189,84 +1190,86 @@ const app = new Vue({ this.getArtistFromID(id) //this.getTypeFromID("artist",id,isLibrary,query) }, - playMediaItem(item) { + playMediaItem(item) { let kind = (item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')) : (item.type ?? '')); let id = (item.attributes.playParams ? (item.attributes.playParams.id ?? (item.id ?? '')) : (item.id ?? '')); ; let isLibrary = item.attributes.playParams ? (item.attributes.playParams.isLibrary ?? false) : false; - + let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind; console.log(kind, id, isLibrary) - app.mk.stop().then(() => { + app.mk.stop().then(() => { if (kind.includes("artist")) { app.mk.setStationQueue({artist: 'a-' + id}).then(() => { app.mk.play() }) - } else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){ - /* Randomize array in-place using Durstenfeld shuffle algorithm */ - function shuffleArray(array) { - for (var i = array.length - 1; i > 0; i--) { - var j = Math.floor(Math.random() * (i + 1)); - var temp = array[i]; - array[i] = array[j]; - array[j] = temp; - } - } - app.mk.clearQueue().then(function () { { - app.mk.setQueue({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () { - app.mk.play().then(function (){ - app.mk.clearQueue().then(function (){ - var playlistId = id - const params = { - include: "tracks", - platform: "web", - "include[library-playlists]": "catalog,tracks", - "fields[playlists]": "curatorName,playlistType,name,artwork,url", - "include[library-songs]": "catalog,artists,albums", - "fields[catalog]": "artistUrl,albumUrl", - "fields[songs]": "artistUrl,albumUrl" - } - var playlistId = '' + } + // else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){ + // /* Randomize array in-place using Durstenfeld shuffle algorithm */ + // function shuffleArray(array) { + // for (var i = array.length - 1; i > 0; i--) { + // var j = Math.floor(Math.random() * (i + 1)); + // var temp = array[i]; + // array[i] = array[j]; + // array[j] = temp; + // } + // } + // app.mk.clearQueue().then(function () { { + // app.mk.setQueue({[truekind]: [item.attributes.playParams.id ?? item.id]}).then(function () { + // app.mk.play().then(function (){ + // app.mk.clearQueue().then(function (){ + // var playlistId = id + // const params = { + // include: "tracks", + // platform: "web", + // "include[library-playlists]": "catalog,tracks", + // "fields[playlists]": "curatorName,playlistType,name,artwork,url", + // "include[library-songs]": "catalog,artists,albums", + // "fields[catalog]": "artistUrl,albumUrl", + // "fields[songs]": "artistUrl,albumUrl" + // } + // var playlistId = '' - try { - function getPlaylist(id, params, isLibrary){ - if (isLibrary){ - return app.mk.api.library.playlist(id, params) - } else { return app.mk.api.playlist(id, params)} - } - getPlaylist(id, params, isLibrary).then(res => { - let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); - if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} - app.mk.queue.append(query) - if (!res.relationships.tracks.next) { - return - } else { - getPlaylistTracks(res.relationships.tracks.next) - } + // try { + // function getPlaylist(id, params, isLibrary){ + // if (isLibrary){ + // return app.mk.api.library.playlist(id, params) + // } else { return app.mk.api.playlist(id, params)} + // } + // getPlaylist(id, params, isLibrary).then(res => { + // let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); + // if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} + // app.mk.queue.append(query) + // if (!res.relationships.tracks.next) { + // return + // } else { + // getPlaylistTracks(res.relationships.tracks.next) + // } - function getPlaylistTracks(next) { - app.apiCall(app.musicBaseUrl + next, res => { - if (res.id != playlistId) { - return - } - let query = res.data.map(item => new MusicKit.MediaItem(item)) - if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} - app.mk.queue.append(query) - - if (res.next) { - getPlaylistTracks(res.next) - } - }) - } - }) - } catch (e) {} - + // function getPlaylistTracks(next) { + // app.apiCall(app.musicBaseUrl + next, res => { + // if (res.id != playlistId) { + // return + // } + // let query = res.data.map(item => new MusicKit.MediaItem(item)) + // if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} + // app.mk.queue.append(query) - }) - }) - }) - } - }) - } else { + // if (res.next) { + // getPlaylistTracks(res.next) + // } + // }) + // } + // }) + // } catch (e) {} + + + // }) + // }) + // }) + // } + // }) + // } + else { app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '') } }) @@ -1565,9 +1568,13 @@ const app = new Vue({ processChunk(response) }) } else { + + if (downloaded.next != null && typeof downloaded.next === "function") { downloaded.next("", params, {includeResponseMeta: !0}).then((response) => { processChunk(response) - }) + }) } else { + console.log("Download next", downloaded.next) + } } } @@ -1641,9 +1648,12 @@ const app = new Vue({ processChunk(response) }) } else { + if (downloaded.next != null && typeof downloaded.next === "function") { downloaded.next("", params, {includeResponseMeta: !0}).then((response) => { processChunk(response) - }) + }) } else { + console.log("Download next", downloaded.next) + } } } @@ -1718,9 +1728,13 @@ const app = new Vue({ processChunk(response) }) } else { - downloaded.next("", "artists", {includeResponseMeta: !0}).then((response) => { - processChunk(response) - }) + if (downloaded.next != null && typeof downloaded.next === "function") { + downloaded.next("", "artists", {includeResponseMeta: !0}).then((response) => { + processChunk(response) + }) } else { + console.log("Download next", downloaded.next) + } + } } @@ -2012,6 +2026,7 @@ const app = new Vue({ const track = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.title ?? '' : ''); const artist = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.artistName ?? '' : ''); const time = encodeURIComponent((this.mk.nowPlayingItem != null) ? (Math.round((this.mk.nowPlayingItem.attributes["durationInMillis"] ?? -1000) / 1000) ?? -1) : -1); + const id = encodeURIComponent((this.mk.nowPlayingItem != null) ? app.mk.nowPlayingItem._songId ?? '' : ''); let lrcfile = ""; let richsync = []; const lang = app.cfg.lyrics.mxm_language // translation language @@ -2020,7 +2035,7 @@ const app = new Vue({ } /* get token */ - function getToken(mode, track, artist, songid, lang, time) { + function getToken(mode, track, artist, songid, lang, time, id) { if (attempt > 2) { app.loadAMLyrics(); } else { @@ -2041,7 +2056,7 @@ const app = new Vue({ app.mxmtoken = token; if (mode == 1) { - getMXMSubs(track, artist, app.mxmtoken, lang, time); + getMXMSubs(track, artist, app.mxmtoken, lang, time, id); } else { getMXMTrans(songid, lang, app.mxmtoken); } @@ -2063,11 +2078,12 @@ const app = new Vue({ } } - function getMXMSubs(track, artist, token, lang, time) { + function getMXMSubs(track, artist, token, lang, time, id) { let usertoken = encodeURIComponent(token); let richsyncQuery = (app.cfg.lyrics.mxm_karaoke) ? "&optional_calls=track.richsync" : "" let timecustom = (!time || (time && time < 0)) ? '' : `&f_subtitle_length=${time}&q_duration=${time}&f_subtitle_length_max_deviation=40`; - let url = "https://apic-desktop.musixmatch.com/ws/1.1/macro.subtitles.get?format=json&namespace=lyrics_richsynched" + richsyncQuery + "&subtitle_format=lrc&q_artist=" + artist + "&q_track=" + track + "&usertoken=" + usertoken + timecustom + "&app_id=web-desktop-app-v1.0&t=" + revisedRandId(); + let itunesid = (id && id != "") ? `&track_itunes_id=${id}` : ''; + let url = "https://apic-desktop.musixmatch.com/ws/1.1/macro.subtitles.get?format=json&namespace=lyrics_richsynched" + richsyncQuery + "&subtitle_format=lrc&q_artist=" + artist + "&q_track=" + track + itunesid + "&usertoken=" + usertoken + timecustom + "&app_id=web-desktop-app-v1.0&t=" + revisedRandId(); let req = new XMLHttpRequest(); req.overrideMimeType("application/json"); req.open('GET', url, true); @@ -2198,7 +2214,7 @@ const app = new Vue({ if (track != "" & track != "No Title Found") { if (app.mxmtoken != null && app.mxmtoken != '') { - getMXMSubs(track, artist, app.mxmtoken, lang, time) + getMXMSubs(track, artist, app.mxmtoken, lang, time, id) } else { getToken(1, track, artist, '', lang, time); } @@ -2370,30 +2386,26 @@ const app = new Vue({ } }) } else { - try { - app.mk.stop() - } catch (e) { - } + app.mk.stop().then(() => { if (truekind == "playlists" && (id.startsWith("p.") || id.startsWith("pl.u"))){ - app.mk.playNext({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () { - app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1) - app.mk.play().then(function(){ - app.mk.clearQueue().then(function () { - if ((app.showingPlaylist && app.showingPlaylist.id == id)) { + app.mk.setQueue({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () { + app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function(){ + if ((app.showingPlaylist && app.showingPlaylist.id == id)) { + let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); + if (query.length > 100) { + let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) } + app.mk.queue.append(u)} + } else { + app.getPlaylistFromID(id, true).then(function () { let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); - if (app.mk.shuffleMode == 1){ shuffleArray(query)} - app.mk.queue.append(query) - } else { - app.getPlaylistFromID(id, true).then(function () { - let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); - if (app.mk.shuffleMode == 1){ shuffleArray(query)} - app.mk.queue.append(query) - }) - } - }) + if (query.length > 100) { + let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) } + app.mk.queue.append(u)} + }) + } }) - - }) + + }) } else{ this.mk.setQueue({[truekind]: [id]}).then(function (queue) { @@ -2411,7 +2423,7 @@ const app = new Vue({ app.mk.play() } })} - } + })} } catch (err) { console.log(err) try { @@ -2681,7 +2693,7 @@ const app = new Vue({ async getCurrentArtURL(){ try{ this.currentArtUrl = ''; - if (app.mk.nowPlayingItem != null && app.mk.nowPlayingItem.attributes != null && app.mk.nowPlayingItem.attributes.artwork != null && app.mk.nowPlayingItem.attributes.artwork.url != null && app.mk.nowPlayingItem.attributes.artwork.url!= '' ) + if (app.mk.nowPlayingItem != null && app.mk.nowPlayingItem.attributes != null && app.mk.nowPlayingItem.attributes.artwork != null && app.mk.nowPlayingItem.attributes.artwork.url != null && app.mk.nowPlayingItem.attributes.artwork.url!= '' ) { this.currentArtUrl = (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? '').replace('{w}', 50).replace('{h}', 50); try{ @@ -3050,9 +3062,18 @@ const app = new Vue({ } }, fullscreen(flag){ - if (flag){ - ipcRenderer.send('setFullScreen', true); app.appMode = 'fullscreen';} - else { ipcRenderer.send('setFullScreen', false); app.appMode = 'player';} + if (flag) { + ipcRenderer.send('setFullScreen', true); + app.appMode = 'fullscreen'; + document.addEventListener('keydown', event => { + if (event.key === 'Escape' && app.appMode === 'fullscreen') { + this.fullscreen(false); + } + }); + } else { + ipcRenderer.send('setFullScreen', false); + app.appMode = 'player'; + } } } diff --git a/src/renderer/style.less b/src/renderer/style.less index 8524e6e3..1a278f0c 100644 --- a/src/renderer/style.less +++ b/src/renderer/style.less @@ -654,12 +654,12 @@ input[type=range].web-slider::-webkit-slider-runnable-track { } .spinner { - background-image: url("assets/spinner.gif"); + background-image: url("assets/spinner.svg"); background-position: center; background-repeat: no-repeat; background-size: contain; - width: 32px; - height: 32px; + width: 50px; + height: 50px; display: inline-block; } @@ -3578,6 +3578,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { background-color: rgba(200, 200, 200, 0.7); } + .playback-button--small{ + opacity: 0.7; + } + .right-col{ height: 50vh; } @@ -3614,8 +3618,8 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { transform: scale(0.5); -webkit-appearance: none; appearance: none; - width: 12px; - height: 12px; + width: 23px; + height: 23px; border-radius: 100%; background: rgba(236, 234, 234, 0.733); cursor: default; @@ -3657,7 +3661,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { .lyrics-col{ - height: 75vh; + height: 62vh; display: flex; justify-content: center; align-content: center; @@ -4135,7 +4139,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { } #apple-music-video-player-controls #player-fullscreen > svg { - width: 50%; + width: 70%; } #apple-music-video-player-controls:hover { diff --git a/src/renderer/views/components/fullscreen.ejs b/src/renderer/views/components/fullscreen.ejs index 4c2cfd4c..1d0a3539 100644 --- a/src/renderer/views/components/fullscreen.ejs +++ b/src/renderer/views/components/fullscreen.ejs @@ -1,5 +1,5 @@
+
@@ -140,10 +140,19 @@ tabMode: "lyrics", } }, + beforeMount() { + window.addEventListener('keyup', this.onEscapeKeyUp); + }, + beforeDestroy() { + window.removeEventListener('keyup', this.onEscapeKeyUp) + }, methods: { - sayHello: function () { - alert('Hello world!'); - } + onEscapeKeyUp(event) { + if (event.which === 27) { + app.fullscreen(false); + console.log('js') + } + }, } }); \ No newline at end of file diff --git a/src/renderer/views/components/mediaitem-list-item.ejs b/src/renderer/views/components/mediaitem-list-item.ejs index fd335e70..bd6f27fb 100644 --- a/src/renderer/views/components/mediaitem-list-item.ejs +++ b/src/renderer/views/components/mediaitem-list-item.ejs @@ -410,12 +410,13 @@ let kind = (item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')) : (item.type ?? '')); let id = (item.attributes.playParams ? (item.attributes.playParams.id ?? (item.id ?? '')) : (item.id ?? ''));; let isLibrary = item.attributes.playParams ? (item.attributes.playParams.isLibrary ?? false) : false; + let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind; console.log(item, parent, childIndex, kind, id, isLibrary, kind == "playlists", id.startsWith("p.") || id.startsWith("pl.u")) app.mk.stop().then(() => { if (parent != null && childIndex != null) { app.queueParentandplayChild(parent, childIndex, item); - } else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){ - /* Randomize array in-place using Durstenfeld shuffle algorithm */ + } + else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){ function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); @@ -424,21 +425,9 @@ array[j] = temp; } } - app.mk.clearQueue().then(function () { - app.mk.setQueue({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () { + app.mk.setQueue({[truekind]: [item.attributes.playParams.id ?? item.id]}).then(function () { app.mk.play().then(function (){ - app.mk.clearQueue().then(function (){ var playlistId = id - const params = { - include: "tracks", - platform: "web", - "include[library-playlists]": "catalog,tracks", - "fields[playlists]": "curatorName,playlistType,name,artwork,url", - "include[library-songs]": "catalog,artists,albums", - "fields[catalog]": "artistUrl,albumUrl", - "fields[songs]": "artistUrl,albumUrl" - } - var playlistId = '' function getPlaylist(id, params, isLibrary){ if (isLibrary){ return app.mk.api.library.playlist(id, params) @@ -447,9 +436,10 @@ try { getPlaylist(id, params, isLibrary).then(res => { - let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); - if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} - app.mk.queue.append(query) + //let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); + //if (app.mk.shuffleMode == 1){shuffleArray(query); } + // console.log(query) + // app.mk.queue.append(query) if (!res.relationships.tracks.next) { return } else { @@ -458,9 +448,10 @@ function getPlaylistTracks(next) { app.apiCall(app.musicBaseUrl + next, res => { - if (res.id != playlistId) { - return - } + // if (res.id != playlistId || next.includes(playlistId)) { + // return + // } + console.log('nextres', res) let query = res.data.map(item => new MusicKit.MediaItem(item)) if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} app.mk.queue.append(query) @@ -474,12 +465,13 @@ } catch (e) {} - }) + }) }) - }) - } else { + + } + 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-mvview-sp.ejs b/src/renderer/views/components/mediaitem-mvview-sp.ejs index 102163ba..bc4e3efa 100644 --- a/src/renderer/views/components/mediaitem-mvview-sp.ejs +++ b/src/renderer/views/components/mediaitem-mvview-sp.ejs @@ -24,13 +24,15 @@
+ {'margin': '205px', + 'margin-left': '260px', 'margin-bottom': '140px', + width: '30px', + height: '30px',}]" @click="app.playMediaItem(item)"> <%- include("../svg/play.svg") %>
@@ -39,13 +41,15 @@
+ {'margin': '205px', + 'margin-left': '260px', 'margin-bottom': '140px', + width: '30px', + height: '30px',}]" @click="app.playMediaItem(item)"> <%- include("../svg/play.svg") %>
diff --git a/src/renderer/views/components/mediaitem-square.ejs b/src/renderer/views/components/mediaitem-square.ejs index f5e320d7..d71554f3 100644 --- a/src/renderer/views/components/mediaitem-square.ejs +++ b/src/renderer/views/components/mediaitem-square.ejs @@ -29,7 +29,7 @@
{{ item.attributes.name }}
-
🅴
+
diff --git a/src/renderer/views/main.ejs b/src/renderer/views/main.ejs index 1c6f6248..8dc07f00 100644 --- a/src/renderer/views/main.ejs +++ b/src/renderer/views/main.ejs @@ -36,7 +36,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -83,9 +92,9 @@ {{ mk.nowPlayingItem["attributes"]["artistName"] }}
- {{ (mk.nowPlayingItem["attributes"]["albumName"]) ? (" - " + - mk.nowPlayingItem["attributes"]["albumName"]) : "" }} + @click="getNowPlayingItemDetailed('album')"> +
{{"-"}}
+ {{(mk.nowPlayingItem["attributes"]["albumName"]) ? (mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
@@ -134,7 +143,7 @@
-
+
@@ -489,7 +498,7 @@
-
+
- <%- include("svg/fullscreen.svg") %> + <%- include("svg/pip.svg") %>
@@ -54,7 +53,7 @@
-
+

Friends Listening To

diff --git a/src/renderer/views/pages/library-albums.ejs b/src/renderer/views/pages/library-albums.ejs index b38542a9..c7b6ca12 100644 --- a/src/renderer/views/pages/library-albums.ejs +++ b/src/renderer/views/pages/library-albums.ejs @@ -51,7 +51,7 @@
- +
diff --git a/src/renderer/views/pages/settings.ejs b/src/renderer/views/pages/settings.ejs index 9372feb9..99156ca3 100644 --- a/src/renderer/views/pages/settings.ejs +++ b/src/renderer/views/pages/settings.ejs @@ -454,10 +454,10 @@
- LastFM Scrobble Delay + LastFM Scrobble Delay (%)
- +
diff --git a/src/renderer/views/svg/fullscreen.svg b/src/renderer/views/svg/fullscreen.svg index c2e3eb1a..602a8572 100644 --- a/src/renderer/views/svg/fullscreen.svg +++ b/src/renderer/views/svg/fullscreen.svg @@ -1,55 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/src/renderer/views/svg/pip.svg b/src/renderer/views/svg/pip.svg new file mode 100644 index 00000000..40f5b738 --- /dev/null +++ b/src/renderer/views/svg/pip.svg @@ -0,0 +1,13 @@ + + + + + + + +