diff --git a/.circleci/config.yml b/.circleci/config.yml index 35ac334d..40c944a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,6 +65,7 @@ jobs: mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts + mv ~/Cider/dist/*.blockmap ~/Cider/dist/artifacts - store_artifacts: path: ~/Cider/dist/artifacts - \ No newline at end of file + diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index 0cd560ee..cbe6547d 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -672,6 +672,15 @@ export class BrowserWindow { await win_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) => { if (process.platform != 'darwin') return; diff --git a/src/renderer/index.js b/src/renderer/index.js index 4c77fe4f..6ac0715b 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -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 } diff --git a/src/renderer/views/components/listitem-horizontal.ejs b/src/renderer/views/components/listitem-horizontal.ejs index a159f362..a8df81f4 100644 --- a/src/renderer/views/components/listitem-horizontal.ejs +++ b/src/renderer/views/components/listitem-horizontal.ejs @@ -41,6 +41,21 @@ 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: { sayHello: function () { alert('Hello world!'); diff --git a/src/renderer/views/components/sidebar-playlist.ejs b/src/renderer/views/components/sidebar-playlist.ejs index 83df7072..bfe0edf6 100644 --- a/src/renderer/views/components/sidebar-playlist.ejs +++ b/src/renderer/views/components/sidebar-playlist.ejs @@ -189,7 +189,7 @@ openPlaylist(item) { this.$root.appRoute(`playlist_` + item.id); this.$root.showingPlaylist = []; - this.$root.getPlaylistFromID(this.$root.page.substring(9)) + this.$root.getPlaylistFromID(this.$root.page.substring(9), true) }, getPlaylistChildren(item) { let self = this diff --git a/src/renderer/views/pages/settings.ejs b/src/renderer/views/pages/settings.ejs index ae4101b5..23292ff0 100644 --- a/src/renderer/views/pages/settings.ejs +++ b/src/renderer/views/pages/settings.ejs @@ -656,7 +656,7 @@ -