* Added update check if using MSS or MAS builds. need help implementing

* fix locale / allow pl to show before list loading is fully done

* oops

* Also copy blockmap for partial download

`[2022-02-15 17:28:30.126] [error] Cannot download differentially, fallback to full download: Error: Cannot download "https://478-429851205-gh.circle-artifacts.com/0/%7E/Cider/dist/artifacts/Cider-Setup-1.1.428.exe.blockmap", status 404: Not Found
    at ClientRequest.<anonymous> (C:\Program Files\Cider\resources\app.asar\node_modules\builder-util-runtime\src\httpExecutor.ts:288:11)
    at ClientRequest.emit (node:events:394:28)
    at ClientRequest.emit (node:domain:475:12)
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:105:6829)
    at SimpleURLLoaderWrapper.emit (node:events:394:28)
    at SimpleURLLoaderWrapper.emit (node:domain:475:12)`

* more lang fix

* fix #459

Co-authored-by: child_duckling <19170969+quacksire@users.noreply.github.com>
Co-authored-by: vapormusic <vietanhfat@gmail.com>
Co-authored-by: JYW0803 <74043061+JYW0803@users.noreply.github.com>
This commit is contained in:
Maikiwi 2022-02-15 18:32:51 -08:00 committed by GitHub
parent c2dc1c479e
commit 453ebc2519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 11 deletions

View file

@ -555,7 +555,7 @@ const app = new Vue({
}
).then(() => {
if (this.page == 'playlist_' + this.showingPlaylist.id) {
this.getPlaylistFromID(this.showingPlaylist.id)
this.getPlaylistFromID(this.showingPlaylist.id, true)
}
})
},
@ -997,7 +997,7 @@ const app = new Vue({
console.log(res)
self.appRoute(`playlist_` + res.id);
self.showingPlaylist = [];
self.getPlaylistFromID(app.page.substring(9))
self.getPlaylistFromID(app.page.substring(9), true)
self.playlists.listing.push({
id: res.id,
attributes: {
@ -1092,7 +1092,7 @@ const app = new Vue({
response = response.data.data[0]
let self = this
let playlistId = response.id
if (!transient) this.playlists.loadingState = 0
this.playlists.loadingState = (!transient) ? 0 : 1
this.showingPlaylist = response
if (!response.relationships.tracks.next) {
this.playlists.loadingState = 1
@ -1572,14 +1572,14 @@ const app = new Vue({
if (kind == "appleCurator") {
app.appleCurator = a.data.data[0]
} else {
this.getPlaylistContinuous(a)
this.getPlaylistContinuous(a, true)
}
}
} finally {
if (kind == "appleCurator") {
app.appleCurator = a.data.data[0]
} else {
this.getPlaylistContinuous(a)
this.getPlaylistContinuous(a, true)
}
}
;
@ -3694,9 +3694,9 @@ const app = new Vue({
let u = this.cfg.general.language;
// use MusicKit.getInstance or crash
try {
item = await MusicKit.getInstance().api.v3.music(`v1/storefronts/${app.mk.storefrontId}`)
let item = await MusicKit.getInstance().api.v3.music(`v1/storefronts/${app.mk.storefrontId}`)
let langcodes = item.data.data[0].attributes.supportedLanguageTags;
if (langcodes) langcodes = langcodes.map(function (u) { return u.toLowerCase() })
if (langcodes) langcodes = langcodes.map(function (u) { return u.replace(/-Han[s|t]/i, "").toLowerCase() })
console.log(langcodes)
let sellang = ""
if (u && langcodes.includes(u.toLowerCase().replace('_', "-"))) {
@ -3705,6 +3705,11 @@ const app = new Vue({
sellang = ((u.toLowerCase()).replace('_', "-")).split("-")[0]
}
if (sellang == "") sellang = (item.data.data[0].attributes.defaultLanguageTag).toLowerCase()
// Fix weird locales:
if (sellang == "iw") sellang = "iw-il"
sellang = sellang.replace(/-Han[s|t]/i, "").toLowerCase()
console.log(sellang)
return await sellang
}