Merge branch 'develop' of https://github.com/Apple-Music-Electron/Cider into develop
This commit is contained in:
commit
2e15b9f29e
7 changed files with 51 additions and 11 deletions
|
@ -65,6 +65,7 @@ jobs:
|
||||||
mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts
|
mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts
|
||||||
mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts
|
mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts
|
||||||
mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts
|
mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts
|
||||||
|
mv ~/Cider/dist/*.blockmap ~/Cider/dist/artifacts
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ~/Cider/dist/artifacts
|
path: ~/Cider/dist/artifacts
|
||||||
|
|
|
@ -276,6 +276,7 @@
|
||||||
"settings.header.visual.hardwareAcceleration.webGPU": "WebGPU",
|
"settings.header.visual.hardwareAcceleration.webGPU": "WebGPU",
|
||||||
"settings.header.visual.theme": "主題",
|
"settings.header.visual.theme": "主題",
|
||||||
"settings.option.visual.theme.github.download" : "從 GitHub 網址安裝" ,
|
"settings.option.visual.theme.github.download" : "從 GitHub 網址安裝" ,
|
||||||
|
"settings.option.visual.theme.github.explore": "瀏覽 GitHub 上的主題",
|
||||||
"settings.prompt.visual.theme.github.URL" : "輸入你要安裝的主題網址" ,
|
"settings.prompt.visual.theme.github.URL" : "輸入你要安裝的主題網址" ,
|
||||||
"settings.notyf.visual.theme.install.success" : "主題成功安裝" ,
|
"settings.notyf.visual.theme.install.success" : "主題成功安裝" ,
|
||||||
"settings.notyf.visual.theme.install.error" : "主題安裝失敗" ,
|
"settings.notyf.visual.theme.install.error" : "主題安裝失敗" ,
|
||||||
|
|
|
@ -672,6 +672,15 @@ export class BrowserWindow {
|
||||||
await win_autoUpdater.checkForUpdatesAndNotify()
|
await win_autoUpdater.checkForUpdatesAndNotify()
|
||||||
await linux_autoUpdater.checkForUpdatesAndNotify()
|
await linux_autoUpdater.checkForUpdatesAndNotify()
|
||||||
});
|
});
|
||||||
|
ipcMain.on('disable-update', (event) => {
|
||||||
|
// Check if using app store builds so people don't get pissy wen button go bonk
|
||||||
|
if (app.isPackaged && !process.mas || !process.windowsStore) {
|
||||||
|
event.returnValue = false
|
||||||
|
} else {
|
||||||
|
event.returnValue = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
ipcMain.on('share-menu', async (_event, url) => {
|
ipcMain.on('share-menu', async (_event, url) => {
|
||||||
if (process.platform != 'darwin') return;
|
if (process.platform != 'darwin') return;
|
||||||
|
|
|
@ -555,7 +555,7 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
if (this.page == 'playlist_' + this.showingPlaylist.id) {
|
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)
|
console.log(res)
|
||||||
self.appRoute(`playlist_` + res.id);
|
self.appRoute(`playlist_` + res.id);
|
||||||
self.showingPlaylist = [];
|
self.showingPlaylist = [];
|
||||||
self.getPlaylistFromID(app.page.substring(9))
|
self.getPlaylistFromID(app.page.substring(9), true)
|
||||||
self.playlists.listing.push({
|
self.playlists.listing.push({
|
||||||
id: res.id,
|
id: res.id,
|
||||||
attributes: {
|
attributes: {
|
||||||
|
@ -1092,7 +1092,7 @@ const app = new Vue({
|
||||||
response = response.data.data[0]
|
response = response.data.data[0]
|
||||||
let self = this
|
let self = this
|
||||||
let playlistId = response.id
|
let playlistId = response.id
|
||||||
if (!transient) this.playlists.loadingState = 0
|
this.playlists.loadingState = (!transient) ? 0 : 1
|
||||||
this.showingPlaylist = response
|
this.showingPlaylist = response
|
||||||
if (!response.relationships.tracks.next) {
|
if (!response.relationships.tracks.next) {
|
||||||
this.playlists.loadingState = 1
|
this.playlists.loadingState = 1
|
||||||
|
@ -1572,14 +1572,14 @@ const app = new Vue({
|
||||||
if (kind == "appleCurator") {
|
if (kind == "appleCurator") {
|
||||||
app.appleCurator = a.data.data[0]
|
app.appleCurator = a.data.data[0]
|
||||||
} else {
|
} else {
|
||||||
this.getPlaylistContinuous(a)
|
this.getPlaylistContinuous(a, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (kind == "appleCurator") {
|
if (kind == "appleCurator") {
|
||||||
app.appleCurator = a.data.data[0]
|
app.appleCurator = a.data.data[0]
|
||||||
} else {
|
} else {
|
||||||
this.getPlaylistContinuous(a)
|
this.getPlaylistContinuous(a, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
@ -3694,9 +3694,9 @@ const app = new Vue({
|
||||||
let u = this.cfg.general.language;
|
let u = this.cfg.general.language;
|
||||||
// use MusicKit.getInstance or crash
|
// use MusicKit.getInstance or crash
|
||||||
try {
|
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;
|
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)
|
console.log(langcodes)
|
||||||
let sellang = ""
|
let sellang = ""
|
||||||
if (u && langcodes.includes(u.toLowerCase().replace('_', "-"))) {
|
if (u && langcodes.includes(u.toLowerCase().replace('_', "-"))) {
|
||||||
|
@ -3705,6 +3705,11 @@ const app = new Vue({
|
||||||
sellang = ((u.toLowerCase()).replace('_', "-")).split("-")[0]
|
sellang = ((u.toLowerCase()).replace('_', "-")).split("-")[0]
|
||||||
}
|
}
|
||||||
if (sellang == "") sellang = (item.data.data[0].attributes.defaultLanguageTag).toLowerCase()
|
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)
|
console.log(sellang)
|
||||||
return await sellang
|
return await sellang
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,21 @@
|
||||||
catch (e){}
|
catch (e){}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
items: function (items) {
|
||||||
|
// give every item an id
|
||||||
|
this.items.forEach(function (item, index) {
|
||||||
|
item.id = index;
|
||||||
|
});
|
||||||
|
// split items into pages
|
||||||
|
this.itemPages = app.arrayToChunk(this.items, 4);
|
||||||
|
try{
|
||||||
|
this.simplifiedParent = JSON.stringify(this.items.map ( function(x){return x.attributes.playParams}));
|
||||||
|
console.log("simplifiedParent: " + this.simplifiedParent);
|
||||||
|
}
|
||||||
|
catch (e){}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sayHello: function () {
|
sayHello: function () {
|
||||||
alert('Hello world!');
|
alert('Hello world!');
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
openPlaylist(item) {
|
openPlaylist(item) {
|
||||||
this.$root.appRoute(`playlist_` + item.id);
|
this.$root.appRoute(`playlist_` + item.id);
|
||||||
this.$root.showingPlaylist = [];
|
this.$root.showingPlaylist = [];
|
||||||
this.$root.getPlaylistFromID(this.$root.page.substring(9))
|
this.$root.getPlaylistFromID(this.$root.page.substring(9), true)
|
||||||
},
|
},
|
||||||
getPlaylistChildren(item) {
|
getPlaylistChildren(item) {
|
||||||
let self = this
|
let self = this
|
||||||
|
|
|
@ -656,7 +656,7 @@
|
||||||
<input type="checkbox" v-model="app.cfg.general.close_button_hide" switch/>
|
<input type="checkbox" v-model="app.cfg.general.close_button_hide" switch/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="md-option-line">
|
<div class="md-option-line update-check">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('settings.option.general.updateCider')}}
|
{{$root.getLz('settings.option.general.updateCider')}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -666,7 +666,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="md-option-line">
|
<div class="md-option-line update-check">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('settings.option.general.updateCider.branch')}}<br>
|
{{$root.getLz('settings.option.general.updateCider.branch')}}<br>
|
||||||
<small>({{$root.getLz('settings.option.general.updateCider.branch.description')}})</small>
|
<small>({{$root.getLz('settings.option.general.updateCider.branch.description')}})</small>
|
||||||
|
@ -852,6 +852,15 @@
|
||||||
ipcRenderer.invoke('setStoreValue', 'general.close_behavior', app.cfg.general.close_behavior);
|
ipcRenderer.invoke('setStoreValue', 'general.close_behavior', app.cfg.general.close_behavior);
|
||||||
// setStoreValue does not change plugin store values somehow
|
// setStoreValue does not change plugin store values somehow
|
||||||
ipcRenderer.invoke('update-store-mtt', app.cfg.general.close_behavior);
|
ipcRenderer.invoke('update-store-mtt', app.cfg.general.close_behavior);
|
||||||
|
},
|
||||||
|
checkIfUpdateDisabled() {
|
||||||
|
if (ipcRenderer.sendSync('disable-update')) {
|
||||||
|
let updateFields = document.getElementsByClassName('update-check');
|
||||||
|
for (var i=0; i < updateFields.length; i++) {
|
||||||
|
updateFields[i].style = "opacity: 0.5; pointer-events: none;";
|
||||||
|
updateFields[i].title = "Not available on this type of build";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue