From e38ddced69e31ea7edc0d8e6741f24c8f6962a84 Mon Sep 17 00:00:00 2001 From: booploops <49113086+booploops@users.noreply.github.com> Date: Tue, 21 Dec 2021 16:09:59 -0800 Subject: [PATCH] CSS Changes to mediaitem-square, updated to do with code for playlist sorting --- src/renderer/style.less | 28 +++++++++++++++++-- src/renderer/todo.js | 20 ++++++++++++- .../views/components/mediaitem-square.ejs | 12 +++++++- src/renderer/views/pages/library-albums.ejs | 10 ++++--- .../views/pages/library-recentlyadded.ejs | 19 +++++++++---- 5 files changed, 75 insertions(+), 14 deletions(-) diff --git a/src/renderer/style.less b/src/renderer/style.less index 5fb7832a..c4ec4b74 100644 --- a/src/renderer/style.less +++ b/src/renderer/style.less @@ -4,7 +4,7 @@ --appleEase: cubic-bezier(0.42, 0, 0.58, 1); --mediaItemShadow-Shadow: inset 0px 0px 0px 1px rgb(200 200 200 / 16%), 0 8px 40px rgb(0 0 0 / 0.55); --mediaItemShadow: inset 0px 0px 0px 1px rgb(200 200 200 / 16%); - --mediaItemRadius: 4px; + --mediaItemRadius: 6px; --mediaItemRadiusRound: 100%; --contentInnerPadding: 16px; --navbarHeight: 48px; @@ -1606,8 +1606,25 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { background: rgba(200, 200, 200, 0.05); border-radius: 10px; padding: var(--contentInnerPadding); - box-shadow: rgb(0 0 0 / 8%) 0px 0px 0px 1px; + box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px; margin-top: 16px; + display: flex; + flex-flow: wrap; + justify-content: center; + + >.cd-mediaitem-square { + width: 220px; + height: 260px; + display: inline-flex; + flex: 0 0 auto; + flex-direction: column; + font-size: 14px; + justify-content: center; + align-items: center; + border-radius: 6px; + max-width: 240px; + flex-grow: 1; + } } /* Album / Playlist Page */ @@ -2573,6 +2590,13 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { text-align: center; font-size: 12px; } + + &.mediaitem-video { + height: 200px; + .artwork { + height: 106px; + } + } } .cd-btn-seeall { diff --git a/src/renderer/todo.js b/src/renderer/todo.js index 075cada0..3e8deaf9 100644 --- a/src/renderer/todo.js +++ b/src/renderer/todo.js @@ -159,4 +159,22 @@ function processChunk (response) { // create Artist / Song/ Album stations: app.mk.setStationQueue({artist:"1258279972"}) -app.mk.setStationQueue({song:"1437308307"}) // yes the song id here can be the albumId, but just keep using the song: \ No newline at end of file +app.mk.setStationQueue({song:"1437308307"}) // yes the song id here can be the albumId, but just keep using the song: + +// Sorting Playlists, send an array of tracks in the format below +// playlist must be fully recursively downloaded first before sorting + +app.mk.api.library.putPlaylistTracklisting(app.showingPlaylist.attributes.playParams.id, [ + { + "id": relationships.tracks.data[X].id, + "type": relationships.tracks.data[X].type + }, + { + "id": relationships.tracks.data[X].id, + "type": relationships.tracks.data[X].type + }, + { + "id": relationships.tracks.data[X].id, + "type": relationships.tracks.data[X].type + }, +]) \ No newline at end of file diff --git a/src/renderer/views/components/mediaitem-square.ejs b/src/renderer/views/components/mediaitem-square.ejs index 8caeaf28..c6207fd4 100644 --- a/src/renderer/views/components/mediaitem-square.ejs +++ b/src/renderer/views/components/mediaitem-square.ejs @@ -1,7 +1,7 @@