fix #108
This commit is contained in:
parent
4dbaa8f53d
commit
6ba500596d
2 changed files with 14 additions and 10 deletions
|
@ -113,6 +113,12 @@ const CiderBase = {
|
||||||
callback({ requestHeaders: details.requestHeaders })
|
callback({ requestHeaders: details.requestHeaders })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
win.webContents.session.webRequest.onHeadersReceived((details, callback) => {
|
||||||
|
if(details.url.match(/^https:\/\/store-\d{3}\.blobstore\.apple\.com/) || details.url.startsWith("https://store-037.blobstore.apple.com")){
|
||||||
|
details.responseHeaders['Access-Control-Allow-Origin'] = '*';}
|
||||||
|
callback({ responseHeaders: details.responseHeaders })
|
||||||
|
})
|
||||||
|
|
||||||
let location = `http://localhost:${CiderBase.clientPort}/`
|
let location = `http://localhost:${CiderBase.clientPort}/`
|
||||||
win.loadURL(location)
|
win.loadURL(location)
|
||||||
win.on("closed", () => {
|
win.on("closed", () => {
|
||||||
|
|
|
@ -2367,10 +2367,9 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
|
|
||||||
let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item));
|
let query = app.library.songs.listing.map(item => new MusicKit.MediaItem(item));
|
||||||
try {
|
|
||||||
app.mk.stop()
|
|
||||||
} catch (e) {
|
app.mk.stop().then(() => {
|
||||||
}
|
|
||||||
this.mk.clearQueue().then(function (_) {
|
this.mk.clearQueue().then(function (_) {
|
||||||
if (app.mk.shuffleMode == 1){ shuffleArray(query)}
|
if (app.mk.shuffleMode == 1){ shuffleArray(query)}
|
||||||
app.mk.queue.append(query)
|
app.mk.queue.append(query)
|
||||||
|
@ -2385,6 +2384,7 @@ const app = new Vue({
|
||||||
app.mk.play()
|
app.mk.play()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
} 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"))){
|
||||||
|
@ -2392,15 +2392,13 @@ const app = new Vue({
|
||||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function(){
|
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function(){
|
||||||
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
||||||
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 (query.length > 100) {
|
let u = query; if (app.mk.shuffleMode == 1) { shuffleArray(u) }
|
||||||
let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) }
|
app.mk.queue.append(u)
|
||||||
app.mk.queue.append(u)}
|
|
||||||
} else {
|
} else {
|
||||||
app.getPlaylistFromID(id, true).then(function () {
|
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 (query.length > 100) {
|
let u = query; if (app.mk.shuffleMode == 1) { shuffleArray(u) }
|
||||||
let u = query.slice(100); if (app.mk.shuffleMode == 1) { shuffleArray(u) }
|
app.mk.queue.append(u)
|
||||||
app.mk.queue.append(u)}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue