diff --git a/package.json b/package.json index 8096e8a..78b644b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "yaradio-yamusic", "productName": "YaMusic.app", - "version": "1.0.5", + "version": "1.0.6", "description": "Yandex Radio and Yandex Music desktop application, two in one :)", "main": "background.js", "scripts": { diff --git a/readme.md b/readme.md index ecf0bd4..e8497f9 100644 --- a/readme.md +++ b/readme.md @@ -47,8 +47,8 @@ Choose a package that is suitable for your OS and install. ## Download | Windows | Linux | Mac | | ------------ | ------------ | ------------ | -| [Download - (**exe**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-Setup-1.0.5.exe) | [Download - (**AppImage**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-1.0.5.AppImage) | [Download - (**dmg**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-1.0.5.dmg) | -| | [Download - (**deb**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/yaradio-yamusic_1.0.5_amd64.deb) | | +| [Download - (**exe**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-Setup-1.0.6.exe) | [Download - (**AppImage**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-1.0.6.AppImage) | [Download - (**dmg**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/YaMusic.app-1.0.6.dmg) | +| | [Download - (**deb**)](https://github.com/dedpnd/yaradio-yamusic/releases/latest/download/yaradio-yamusic_1.0.6_amd64.deb) | | diff --git a/src/background.ts b/src/background.ts index 81b63e2..f2ee1a6 100644 --- a/src/background.ts +++ b/src/background.ts @@ -144,15 +144,17 @@ app.on("ready", async () => { details.url.includes("strm.yandex.ru") || details.url.includes("mc.yandex.ru\/clmap") || details.url.includes("yandex.ru\/ads")){ + // Skip advertising return { cancel: true } } - if (details.url.includes("start?__t")) { + if (details.url.includes("start?__t")) { // Notification for next sing notification(win); - } + } + callback({}); }) }); diff --git a/src/electron/notification.ts b/src/electron/notification.ts index 3cdd61f..01044c0 100644 --- a/src/electron/notification.ts +++ b/src/electron/notification.ts @@ -23,7 +23,7 @@ async function invoke(title: string, msg: string, img: string) { await fs.promises.writeFile(pathToFile, await resImg.buffer(), { encoding: 'binary' }); imgFile = pathToFile; } - + new Notification({ title: title || 'YaMusic', body: msg || '-', diff --git a/src/electron/store.ts b/src/electron/store.ts index 6782a19..2a8ae08 100644 --- a/src/electron/store.ts +++ b/src/electron/store.ts @@ -1,6 +1,7 @@ import Store from "electron-store"; import { Rectangle } from "electron"; + interface StoreType { settings: { notifications: boolean; diff --git a/src/views/YandexMusic.vue b/src/views/YandexMusic.vue index a7b6b27..5f940ac 100644 --- a/src/views/YandexMusic.vue +++ b/src/views/YandexMusic.vue @@ -7,6 +7,7 @@ style="height: 100%" allowpopups plugins + partition="persist:webviewsession" >