Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
6f95494587
13 changed files with 166 additions and 196 deletions
|
@ -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 {
|
||||
|
|
7
src/renderer/assets/explicit.svg
Normal file
7
src/renderer/assets/explicit.svg
Normal 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 |
|
@ -1,18 +1,20 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.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="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, 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">
|
||||
<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
|
||||
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
|
||||
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
|
||||
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
|
||||
C58.124,39.3,60,34.786,60,30C60,20.075,51.925,12,42,12z"/>
|
||||
<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
|
||||
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
|
||||
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
|
||||
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"/>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M482.197,374.266l-78.717-45.448c-15.89-9.174-35.829,2.308-35.829,20.686v27.587H151.058
|
||||
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
|
||||
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
|
||||
C498.086,406.465,498.113,383.456,482.197,374.266z"/>
|
||||
<path d="M360.942,99.189H144.349V71.601c0-18.347-19.913-29.876-35.829-20.686L29.803,96.362
|
||||
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
|
||||
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>
|
||||
|
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1568,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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1644,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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1721,9 +1728,13 @@ const app = new Vue({
|
|||
processChunk(response)
|
||||
})
|
||||
} else {
|
||||
if (downloaded.next != null && typeof downloaded.next === "function") {
|
||||
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 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
|
||||
|
@ -2023,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 {
|
||||
|
@ -2044,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);
|
||||
}
|
||||
|
@ -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 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);
|
||||
|
@ -2201,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);
|
||||
}
|
||||
|
@ -2375,23 +2388,22 @@ const app = new Vue({
|
|||
} else {
|
||||
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 () {
|
||||
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 (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 {
|
||||
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)}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
|
|
@ -416,73 +416,61 @@
|
|||
if (parent != null && childIndex != null) {
|
||||
app.queueParentandplayChild(parent, childIndex, item);
|
||||
}
|
||||
// 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));
|
||||
// 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, 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 {
|
||||
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));
|
||||
var temp = array[i];
|
||||
array[i] = array[j];
|
||||
array[j] = temp;
|
||||
}
|
||||
}
|
||||
app.mk.setQueue({[truekind]: [item.attributes.playParams.id ?? item.id]}).then(function () {
|
||||
app.mk.play().then(function (){
|
||||
var playlistId = id
|
||||
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 => {
|
||||
// let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
|
||||
// if (app.mk.shuffleMode == 1){shuffleArray(query); }
|
||||
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(query)
|
||||
// app.mk.queue.append(query)
|
||||
// if (!res.relationships.tracks.next) {
|
||||
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 || next.includes(playlistId)) {
|
||||
// return
|
||||
// } else {
|
||||
// getPlaylistTracks(res.relationships.tracks.next)
|
||||
// }
|
||||
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)
|
||||
|
||||
// function getPlaylistTracks(next) {
|
||||
// app.apiCall(app.musicBaseUrl + next, res => {
|
||||
// // 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)
|
||||
|
||||
// if (res.next) {
|
||||
// getPlaylistTracks(res.next)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// } catch (e) {}
|
||||
if (res.next) {
|
||||
getPlaylistTracks(res.next)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {}
|
||||
|
||||
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
// })
|
||||
// }
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
app.playMediaItemById(item.attributes.playParams.id ?? item.id, item.attributes.playParams.kind ?? item.type, item.attributes.playParams.isLibrary ?? false, item.attributes.url)
|
||||
}})
|
||||
|
|
|
@ -24,13 +24,15 @@
|
|||
<div class="button" style="
|
||||
border-radius: 50%;
|
||||
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',
|
||||
width: '30px',
|
||||
height: '30px',} :
|
||||
{margin: '35px', 'margin-left': '95px',
|
||||
width: '120px',
|
||||
height: '120px',}]" @click="app.playMediaItem(item)">
|
||||
{'margin': '205px',
|
||||
'margin-left': '260px', 'margin-bottom': '140px',
|
||||
width: '30px',
|
||||
height: '30px',}]" @click="app.playMediaItem(item)">
|
||||
<%- include("../svg/play.svg") %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,13 +41,15 @@
|
|||
<div class="button" style="
|
||||
border-radius: 50%;
|
||||
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',
|
||||
width: '30px',
|
||||
height: '30px',} :
|
||||
{margin: '35px', 'margin-left': '95px',
|
||||
width: '120px',
|
||||
height: '120px',}]" @click="app.playMediaItem(item)">
|
||||
{'margin': '205px',
|
||||
'margin-left': '260px', 'margin-bottom': '140px',
|
||||
width: '30px',
|
||||
height: '30px',}]" @click="app.playMediaItem(item)">
|
||||
<%- include("../svg/play.svg") %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<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="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 class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
|
||||
v-if="getSubtitle() != ''">
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
<div class="song-artist item-navigate" style="display: inline-block;"
|
||||
@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"]) : "" }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -498,7 +498,7 @@
|
|||
</transition>
|
||||
<div id="apple-music-video-container">
|
||||
<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"
|
||||
aria-role="presentation" focusable="false">
|
||||
<path
|
||||
|
@ -516,7 +516,7 @@
|
|||
<div id="player-pip"
|
||||
@click="document.querySelector('video#apple-music-video-player').requestPictureInPicture()"
|
||||
title="Picture-in-Picture">
|
||||
<%- include("svg/fullscreen.svg") %>
|
||||
<%- include("svg/pip.svg") %>
|
||||
</div>
|
||||
<div id="player-fullscreen"
|
||||
@click="document.querySelector('video#apple-music-video-player').requestFullscreen()"
|
||||
|
|
|
@ -59,11 +59,11 @@
|
|||
</template>
|
||||
<div class="playlist-controls">
|
||||
<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
|
||||
</button>
|
||||
<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
|
||||
</button>
|
||||
<button class="wr-btn" style="min-width: 120px;" v-if="inLibrary!=null"
|
||||
|
@ -313,8 +313,7 @@
|
|||
return ""
|
||||
}
|
||||
},
|
||||
shufflePlay() {
|
||||
app.mk.shuffleMode = 1;
|
||||
play() {
|
||||
function shuffleArray(array) {
|
||||
for (var i = array.length - 1; i > 0; i--) {
|
||||
var j = Math.floor(Math.random() * (i + 1));
|
||||
|
@ -323,34 +322,27 @@
|
|||
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")
|
||||
var kind = this.data.attributes.playParams.kind ?? this.data.type ?? '';
|
||||
//console.log("1")
|
||||
var truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
||||
// console.log("1")
|
||||
// var isLibrary = this.data.attributes.playParams ? (this.data.attributes.playParams.isLibrary ?? false) : false;
|
||||
console.log("1")
|
||||
app.mk.stop().then(function () {
|
||||
console.log("2")
|
||||
app.mk.setQueue({ [truekind]: [id] }).then(function () {
|
||||
app.mk.play().then(function () {
|
||||
if (!kind.includes("album"))
|
||||
app.mk.clearQueue().then(function () {
|
||||
try {
|
||||
|
||||
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) }
|
||||
|
||||
|
||||
app.mk.stop().then(function () {
|
||||
app.mk.setQueue({[truekind]: [id]}).then(function () {
|
||||
app.mk.play().then(function () {
|
||||
if (query.length > 100) {
|
||||
let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) }
|
||||
app.mk.queue.append(u)}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,9 +25,8 @@
|
|||
<template v-if="artistFeed.length > 0">
|
||||
<mediaitem-list-item v-for="item in artistFeed.limit(6)" :item="item"></mediaitem-list-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="spinner"></div>
|
||||
</template>
|
||||
<div class="spinner" v-else-if="followedArtists.length > 0"></div>
|
||||
<div class="no-artist" v-else> Follow some artists first and their latest releases will be here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,7 +53,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="friendsListeningTo && friendsListeningTo != []">
|
||||
<div class="row" v-if="friendsListeningTo && friendsListeningTo.length > 0">
|
||||
<div class="col">
|
||||
<h3>Friends Listening To</h3>
|
||||
<div class="well">
|
||||
|
|
|
@ -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"
|
||||
fill="#eee" viewBox="0 0 384.97 384.97" style="enable-background:new 0 0 384.97 384.97;" xml:space="preserve">
|
||||
<g>
|
||||
<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 xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="white">
|
||||
<path d="M0 0h36v36h-36z" fill="none"/>
|
||||
<path d="M10 21h-3v8h8v-3h-5v-5zm-3-6h3v-5h5v-3h-8v8zm19 11h-5v3h8v-8h-3v5zm-5-19v3h5v5h3v-8h-8z"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 252 B |
13
src/renderer/views/svg/pip.svg
Normal file
13
src/renderer/views/svg/pip.svg
Normal 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 |
Loading…
Add table
Add a link
Reference in a new issue