Skip to content

Commit

Permalink
fix: webview partition
Browse files Browse the repository at this point in the history
  • Loading branch information
dedpnd committed Jan 23, 2023
1 parent 767dab7 commit 353ceb7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | |



Expand Down
6 changes: 4 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
})
});
Expand Down
2 changes: 1 addition & 1 deletion src/electron/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '-',
Expand Down
1 change: 1 addition & 0 deletions src/electron/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Store from "electron-store";
import { Rectangle } from "electron";


interface StoreType {
settings: {
notifications: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/views/YandexMusic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
style="height: 100%"
allowpopups
plugins
partition="persist:webviewsession"
></webview>
<v-progress-circular
:size="70"
Expand Down
1 change: 1 addition & 0 deletions src/views/YandexRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
style="height: 100%"
allowpopups
plugins
partition="persist:webviewsession"
></webview>
<v-progress-circular
:size="70"
Expand Down

0 comments on commit 353ceb7

Please sign in to comment.