Merge remote-tracking branch 'origin/main'

This commit is contained in:
Core 2022-01-10 20:23:58 +00:00
commit 6f95494587
No known key found for this signature in database
GPG key ID: 1B77805746C47C28
13 changed files with 166 additions and 196 deletions

View file

@ -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))) 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; break;
if (g.hdcpLevel === "NONE" && (g.url.includes("gr230"))){ if (g.hdcpLevel === "NONE"){
n.push(g)} n.push(g)}
} }
return { return {

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><path d="M663.4,336.7V226.9H336.7v546.2h326.7V663.3H446.5V553.5h216.9V446.3H446.5V336.6h216.9V336.7z M880.3,10c28.9,0,54.4,11.1,76.6,33.2c22.1,22.1,33.2,47.6,33.2,76.6v760.6c0,28.9-11.1,54.4-33.2,76.6c-22.1,22.1-47.6,33.2-76.6,33.2H119.7c-28.9,0-54.4-11.1-76.6-33.2C21.1,934.7,10,909.2,10,880.3V119.7c0-28.9,11.1-54.4,33.2-76.6C65.3,21.1,90.8,10,119.7,10H880.3z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 853 B

View file

@ -1,18 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" fill="white" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">
<g> <g>
<path fill="white" d="M42,12H20.414l7.293-7.293c0.391-0.391,0.391-1.023,0-1.414s-1.023-0.391-1.414,0l-8.999,8.999 <g>
c-0.093,0.092-0.166,0.203-0.217,0.326c-0.101,0.244-0.101,0.52,0,0.764c0.051,0.123,0.124,0.234,0.217,0.326l8.999,8.999 <g>
C26.488,22.902,26.744,23,27,23s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L20.414,14H42c8.822,0,16,7.178,16,16 <path d="M482.197,374.266l-78.717-45.448c-15.89-9.174-35.829,2.308-35.829,20.686v27.587H151.058
c0,4.252-1.668,8.264-4.696,11.295c-0.391,0.391-0.391,1.024,0,1.414c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293 C87.461,377.09,35.721,325.351,35.721,261.753c0-9.864-7.997-17.86-17.86-17.86c-9.864,0-17.86,7.997-17.86,17.86
C58.124,39.3,60,34.786,60,30C60,20.075,51.925,12,42,12z"/> c0,83.294,67.765,151.058,151.058,151.058h216.591v27.587c0,18.347,19.913,29.876,35.829,20.686l78.717-45.447
<path fill="white" d="M35.707,37.293c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414L41.586,46H18C9.178,46,2,38.822,2,30 C498.086,406.465,498.113,383.456,482.197,374.266z"/>
c0-3.783,1.359-7.46,3.828-10.354c0.358-0.421,0.309-1.052-0.111-1.41c-0.419-0.359-1.052-0.31-1.41,0.111 <path d="M360.942,99.189H144.349V71.601c0-18.347-19.913-29.876-35.829-20.686L29.803,96.362
C1.529,21.604,0,25.741,0,30c0,9.925,8.075,18,18,18h23.586l-7.293,7.293c-0.391,0.391-0.391,1.023,0,1.414 c-15.889,9.173-15.917,32.182,0,41.372l78.717,45.448c15.89,9.174,35.829-2.309,35.829-20.686v-27.587h216.593
C34.488,56.902,34.744,57,35,57s0.512-0.098,0.707-0.293l9-9c0.391-0.391,0.391-1.023,0-1.414L35.707,37.293z"/> c63.598,0,115.337,51.739,115.337,115.337c0,9.864,7.997,17.86,17.86,17.86c9.864,0,17.86-7.997,17.86-17.86
C512,166.953,444.235,99.189,360.942,99.189z"/>
</g>
</g>
</g> </g>
<g> <g>
</g> </g>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

@ -1568,9 +1568,13 @@ const app = new Vue({
processChunk(response) processChunk(response)
}) })
} else { } else {
if (downloaded.next != null && typeof downloaded.next === "function") {
downloaded.next("", params, {includeResponseMeta: !0}).then((response) => { downloaded.next("", params, {includeResponseMeta: !0}).then((response) => {
processChunk(response) processChunk(response)
}) }) } else {
console.log("Download next", downloaded.next)
}
} }
} }
@ -1644,9 +1648,12 @@ const app = new Vue({
processChunk(response) processChunk(response)
}) })
} else { } else {
if (downloaded.next != null && typeof downloaded.next === "function") {
downloaded.next("", params, {includeResponseMeta: !0}).then((response) => { downloaded.next("", params, {includeResponseMeta: !0}).then((response) => {
processChunk(response) processChunk(response)
}) }) } else {
console.log("Download next", downloaded.next)
}
} }
} }
@ -1721,9 +1728,13 @@ const app = new Vue({
processChunk(response) processChunk(response)
}) })
} else { } else {
downloaded.next("", "artists", {includeResponseMeta: !0}).then((response) => { if (downloaded.next != null && typeof downloaded.next === "function") {
processChunk(response) downloaded.next("", "artists", {includeResponseMeta: !0}).then((response) => {
}) processChunk(response)
}) } else {
console.log("Download next", downloaded.next)
}
} }
} }
@ -2015,6 +2026,7 @@ const app = new Vue({
const track = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.title ?? '' : ''); const track = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.title ?? '' : '');
const artist = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.artistName ?? '' : ''); 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 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 lrcfile = "";
let richsync = []; let richsync = [];
const lang = app.cfg.lyrics.mxm_language // translation language const lang = app.cfg.lyrics.mxm_language // translation language
@ -2023,7 +2035,7 @@ const app = new Vue({
} }
/* get token */ /* get token */
function getToken(mode, track, artist, songid, lang, time) { function getToken(mode, track, artist, songid, lang, time, id) {
if (attempt > 2) { if (attempt > 2) {
app.loadAMLyrics(); app.loadAMLyrics();
} else { } else {
@ -2044,7 +2056,7 @@ const app = new Vue({
app.mxmtoken = token; app.mxmtoken = token;
if (mode == 1) { if (mode == 1) {
getMXMSubs(track, artist, app.mxmtoken, lang, time); getMXMSubs(track, artist, app.mxmtoken, lang, time, id);
} else { } else {
getMXMTrans(songid, lang, app.mxmtoken); getMXMTrans(songid, lang, app.mxmtoken);
} }
@ -2066,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 usertoken = encodeURIComponent(token);
let richsyncQuery = (app.cfg.lyrics.mxm_karaoke) ? "&optional_calls=track.richsync" : "" 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 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(); let req = new XMLHttpRequest();
req.overrideMimeType("application/json"); req.overrideMimeType("application/json");
req.open('GET', url, true); req.open('GET', url, true);
@ -2201,7 +2214,7 @@ const app = new Vue({
if (track != "" & track != "No Title Found") { if (track != "" & track != "No Title Found") {
if (app.mxmtoken != null && app.mxmtoken != '') { if (app.mxmtoken != null && app.mxmtoken != '') {
getMXMSubs(track, artist, app.mxmtoken, lang, time) getMXMSubs(track, artist, app.mxmtoken, lang, time, id)
} else { } else {
getToken(1, track, artist, '', lang, time); getToken(1, track, artist, '', lang, time);
} }
@ -2375,22 +2388,21 @@ const app = new Vue({
} else { } else {
app.mk.stop().then(() => { app.mk.stop().then(() => {
if (truekind == "playlists" && (id.startsWith("p.") || id.startsWith("pl.u"))){ 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.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) app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function(){
app.mk.play().then(function(){ if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
app.mk.clearQueue().then(function () { let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
if ((app.showingPlaylist && app.showingPlaylist.id == id)) { 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)); let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
if (app.mk.shuffleMode == 1){ shuffleArray(query)} if (query.length > 100) {
app.mk.queue.append(query) let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) }
} else { app.mk.queue.append(u)}
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)
})
}
})
}) })
}) })

View file

@ -3578,6 +3578,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
background-color: rgba(200, 200, 200, 0.7); background-color: rgba(200, 200, 200, 0.7);
} }
.playback-button--small{
opacity: 0.7;
}
.right-col{ .right-col{
height: 50vh; height: 50vh;
} }
@ -4135,7 +4139,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
} }
#apple-music-video-player-controls #player-fullscreen > svg { #apple-music-video-player-controls #player-fullscreen > svg {
width: 50%; width: 70%;
} }
#apple-music-video-player-controls:hover { #apple-music-video-player-controls:hover {

View file

@ -416,73 +416,61 @@
if (parent != null && childIndex != null) { if (parent != null && childIndex != null) {
app.queueParentandplayChild(parent, childIndex, item); app.queueParentandplayChild(parent, childIndex, item);
} }
// else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){ else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))){
// function shuffleArray(array) { function shuffleArray(array) {
// for (var i = array.length - 1; i > 0; i--) { for (var i = array.length - 1; i > 0; i--) {
// var j = Math.floor(Math.random() * (i + 1)); var j = Math.floor(Math.random() * (i + 1));
// var temp = array[i]; var temp = array[i];
// array[i] = array[j]; array[i] = array[j];
// array[j] = temp; array[j] = temp;
// } }
// } }
// app.mk.clearQueue().then(function () { app.mk.setQueue({[truekind]: [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.play().then(function (){ var playlistId = id
// app.mk.clearQueue().then(function (){ function getPlaylist(id, params, isLibrary){
// var playlistId = id if (isLibrary){
// const params = { return app.mk.api.library.playlist(id, params)
// // include: "tracks", } else { return app.mk.api.playlist(id, params)}
// // platform: "web", }
// // "include[library-playlists]": "catalog,tracks", try {
// // "fields[playlists]": "curatorName,playlistType,name,artwork,url",
// // "include[library-songs]": "catalog,artists,albums",
// // "fields[catalog]": "artistUrl,albumUrl",
// // "fields[songs]": "artistUrl,albumUrl, playParams"
// }
// // var playlistId = ''
// function getPlaylist(id, params, isLibrary){
// if (isLibrary){
// return app.mk.api.library.playlist(id, params)
// } else { return app.mk.api.playlist(id, params)}
// }
// try {
// getPlaylist(id, params, isLibrary).then(res => { getPlaylist(id, params, isLibrary).then(res => {
// let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)); //let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
// if (app.mk.shuffleMode == 1){shuffleArray(query); } //if (app.mk.shuffleMode == 1){shuffleArray(query); }
// console.log(query) // console.log(query)
// app.mk.queue.append(query) // app.mk.queue.append(query)
// if (!res.relationships.tracks.next) { if (!res.relationships.tracks.next) {
// return return
// } else { } else {
// getPlaylistTracks(res.relationships.tracks.next) getPlaylistTracks(res.relationships.tracks.next)
// } }
// function getPlaylistTracks(next) { function getPlaylistTracks(next) {
// app.apiCall(app.musicBaseUrl + next, res => { app.apiCall(app.musicBaseUrl + next, res => {
// // if (res.id != playlistId || next.includes(playlistId)) { // if (res.id != playlistId || next.includes(playlistId)) {
// // return // return
// // } // }
// console.log('nextres', res) console.log('nextres', res)
// let query = res.data.map(item => new MusicKit.MediaItem(item)) let query = res.data.map(item => new MusicKit.MediaItem(item))
// if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')} if (app.mk.shuffleMode == 1){shuffleArray(query); console.log('shf')}
// app.mk.queue.append(query) app.mk.queue.append(query)
// if (res.next) { if (res.next) {
// getPlaylistTracks(res.next) getPlaylistTracks(res.next)
// } }
// }) })
// } }
// }) })
// } catch (e) {} } 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) app.playMediaItemById(item.attributes.playParams.id ?? item.id, item.attributes.playParams.kind ?? item.type, item.attributes.playParams.isLibrary ?? false, item.attributes.url)
}}) }})

View file

@ -24,13 +24,15 @@
<div class="button" style=" <div class="button" style="
border-radius: 50%; border-radius: 50%;
background: rgba(50,50,50,0.7);" background: rgba(50,50,50,0.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': '205px', :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': '205px',
'margin-left': '260px', 'margin-bottom': '140px', 'margin-left': '260px', 'margin-bottom': '140px',
width: '30px', width: '30px',
height: '30px',} : height: '30px',} :
{margin: '35px', 'margin-left': '95px', {'margin': '205px',
width: '120px', 'margin-left': '260px', 'margin-bottom': '140px',
height: '120px',}]" @click="app.playMediaItem(item)"> width: '30px',
height: '30px',}]" @click="app.playMediaItem(item)">
<%- include("../svg/play.svg") %> <%- include("../svg/play.svg") %>
</div> </div>
</div> </div>
@ -39,13 +41,15 @@
<div class="button" style=" <div class="button" style="
border-radius: 50%; border-radius: 50%;
background: rgba(50,50,50,0.7);" background: rgba(50,50,50,0.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': '205px', :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': '205px',
'margin-left': '260px', 'margin-bottom': '140px', 'margin-left': '260px', 'margin-bottom': '140px',
width: '30px', width: '30px',
height: '30px',} : height: '30px',} :
{margin: '35px', 'margin-left': '95px', {'margin': '205px',
width: '120px', 'margin-left': '260px', 'margin-bottom': '140px',
height: '120px',}]" @click="app.playMediaItem(item)"> width: '30px',
height: '30px',}]" @click="app.playMediaItem(item)">
<%- include("../svg/play.svg") %> <%- include("../svg/play.svg") %>
</div> </div>
</div> </div>

View file

@ -29,7 +29,7 @@
<div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}"> <div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}">
<div class="title" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'> <div class="title" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'>
<div class="item-navigate text-overflow-elipsis">{{ item.attributes.name }}</div> <div class="item-navigate text-overflow-elipsis">{{ item.attributes.name }}</div>
<div v-if="item.attributes && item.attributes.contentRating == 'explicit'" style= "margin-top: -2.6px;margin-left: 3px;">🅴</div> <div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'" style= "background-image: url(./assets/explicit.svg);height: 12px;width: 12px;filter: contrast(0);background-repeat: no-repeat;margin-top: 2.63px;margin-left: 4px;"></div>
</div> </div>
<div class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()" <div class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
v-if="getSubtitle() != ''"> v-if="getSubtitle() != ''">

View file

@ -93,7 +93,7 @@
</div> </div>
<div class="song-artist item-navigate" style="display: inline-block;" <div class="song-artist item-navigate" style="display: inline-block;"
@click="getNowPlayingItemDetailed('album')"> @click="getNowPlayingItemDetailed('album')">
<div class="song-artist separator" style="display: inline-block;">{{"-"}}</div> <div class="separator" style="display: inline-block;">{{"-"}}</div>
{{(mk.nowPlayingItem["attributes"]["albumName"]) ? (mk.nowPlayingItem["attributes"]["albumName"]) : "" }} {{(mk.nowPlayingItem["attributes"]["albumName"]) ? (mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
</div> </div>
</div> </div>
@ -498,7 +498,7 @@
</transition> </transition>
<div id="apple-music-video-container"> <div id="apple-music-video-container">
<div id="apple-music-video-player-controls"> <div id="apple-music-video-player-controls">
<div id="player-exit" title="Close" @click="app.exitMV()"> <div id="player-exit" title="Close" @click="exitMV()">
<svg fill="white" xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21" <svg fill="white" xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21"
aria-role="presentation" focusable="false"> aria-role="presentation" focusable="false">
<path <path
@ -516,7 +516,7 @@
<div id="player-pip" <div id="player-pip"
@click="document.querySelector('video#apple-music-video-player').requestPictureInPicture()" @click="document.querySelector('video#apple-music-video-player').requestPictureInPicture()"
title="Picture-in-Picture"> title="Picture-in-Picture">
<%- include("svg/fullscreen.svg") %> <%- include("svg/pip.svg") %>
</div> </div>
<div id="player-fullscreen" <div id="player-fullscreen"
@click="document.querySelector('video#apple-music-video-player').requestFullscreen()" @click="document.querySelector('video#apple-music-video-player').requestFullscreen()"

View file

@ -59,11 +59,11 @@
</template> </template>
<div class="playlist-controls"> <div class="playlist-controls">
<button class="wr-btn" style="min-width: 120px;" <button class="wr-btn" style="min-width: 120px;"
@click="app.mk.shuffleMode = 0; app.mk.stop().then(function() {app.playMediaItemById(data.attributes.playParams.id ?? data.id, data.attributes.playParams.kind ?? data.type, data.attributes.playParams.isLibrary ?? false, data.attributes.url)})"> @click="app.mk.shuffleMode = 0; play()">
Play Play
</button> </button>
<button class="wr-btn" style="min-width: 120px;" <button class="wr-btn" style="min-width: 120px;"
@click="app.mk.shuffleMode = 1; app.mk.stop().then(function() {app.playMediaItemById(data.attributes.playParams.id ?? data.id, data.attributes.playParams.kind ?? data.type, data.attributes.playParams.isLibrary ?? false, data.attributes.url)})"> @click="app.mk.shuffleMode = 1;play()">
Shuffle Shuffle
</button> </button>
<button class="wr-btn" style="min-width: 120px;" v-if="inLibrary!=null" <button class="wr-btn" style="min-width: 120px;" v-if="inLibrary!=null"
@ -313,8 +313,7 @@
return "" return ""
} }
}, },
shufflePlay() { play() {
app.mk.shuffleMode = 1;
function shuffleArray(array) { function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) { for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1)); var j = Math.floor(Math.random() * (i + 1));
@ -323,34 +322,27 @@
array[j] = temp; array[j] = temp;
} }
} }
//var id = this.data.attributes.playParams.id ?? this.data.id; var id = this.data.attributes.playParams.id ?? this.data.id;
//console.log("1") //console.log("1")
var kind = this.data.attributes.playParams.kind ?? this.data.type ?? ''; var kind = this.data.attributes.playParams.kind ?? this.data.type ?? '';
//console.log("1") //console.log("1")
var truekind = (!kind.endsWith("s")) ? (kind + "s") : kind; var truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
// console.log("1")
// var isLibrary = this.data.attributes.playParams ? (this.data.attributes.playParams.isLibrary ?? false) : false; let query = (this.data ?? app.showingPlaylist).relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
console.log("1")
app.mk.stop().then(function () { app.mk.stop().then(function () {
console.log("2") app.mk.setQueue({[truekind]: [id]}).then(function () {
app.mk.setQueue({ [truekind]: [id] }).then(function () {
app.mk.play().then(function () { app.mk.play().then(function () {
if (!kind.includes("album")) if (query.length > 100) {
app.mk.clearQueue().then(function () { let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) }
try { app.mk.queue.append(u)}
let query = (this.data ?? app.showingPlaylist).relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
if (app.mk.shuffleMode == 1) { shuffleArray(query) }
app.mk.queue.append(query)
} catch (e) { console.log(e) }
})
}) })
})
}) })
})
} }
} }

View file

@ -25,9 +25,8 @@
<template v-if="artistFeed.length > 0"> <template v-if="artistFeed.length > 0">
<mediaitem-list-item v-for="item in artistFeed.limit(6)" :item="item"></mediaitem-list-item> <mediaitem-list-item v-for="item in artistFeed.limit(6)" :item="item"></mediaitem-list-item>
</template> </template>
<template v-else> <div class="spinner" v-else-if="followedArtists.length > 0"></div>
<div class="spinner"></div> <div class="no-artist" v-else> Follow some artists first and their latest releases will be here</div>
</template>
</div> </div>
</div> </div>
</div> </div>
@ -54,7 +53,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" v-if="friendsListeningTo && friendsListeningTo != []"> <div class="row" v-if="friendsListeningTo && friendsListeningTo.length > 0">
<div class="col"> <div class="col">
<h3>Friends Listening To</h3> <h3>Friends Listening To</h3>
<div class="well"> <div class="well">

View file

@ -1,55 +1,4 @@
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="white">
fill="#eee" viewBox="0 0 384.97 384.97" style="enable-background:new 0 0 384.97 384.97;" xml:space="preserve"> <path d="M0 0h36v36h-36z" fill="none"/>
<g> <path d="M10 21h-3v8h8v-3h-5v-5zm-3-6h3v-5h5v-3h-8v8zm19 11h-5v3h8v-8h-3v5zm-5-19v3h5v5h3v-8h-8z"/>
<g id="Fullscreen_1_">
<path d="M372.939,216.545c-6.123,0-12.03,5.269-12.03,12.03v132.333H24.061V24.061h132.333c6.388,0,12.03-5.642,12.03-12.03
S162.409,0,156.394,0H24.061C10.767,0,0,10.767,0,24.061v336.848c0,13.293,10.767,24.061,24.061,24.061h336.848
c13.293,0,24.061-10.767,24.061-24.061V228.395C384.97,221.731,380.085,216.545,372.939,216.545z"/>
<path d="M372.939,0H252.636c-6.641,0-12.03,5.39-12.03,12.03s5.39,12.03,12.03,12.03h91.382L99.635,268.432
c-4.668,4.668-4.668,12.235,0,16.903c4.668,4.668,12.235,4.668,16.891,0L360.909,40.951v91.382c0,6.641,5.39,12.03,12.03,12.03
s12.03-5.39,12.03-12.03V12.03l0,0C384.97,5.558,379.412,0,372.939,0z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 252 B

Before After
Before After

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
fill="white" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<style type="text/css">
.st0{fill:#333333;}
</style>
<g id="XMLID_6_">
<path id="XMLID_11_" class="st0" d="M418.5,139.4H232.4v139.8h186.1V139.4z M464.8,46.7H46.3C20.5,46.7,0,68.1,0,93.1v325.9
c0,25.8,21.4,46.3,46.3,46.3h419.4c25.8,0,46.3-20.5,46.3-46.3V93.1C512,67.2,490.6,46.7,464.8,46.7z M464.8,418.9H46.3V92.2h419.4
v326.8H464.8z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 716 B