Skip to content

Commit

Permalink
fix: bilibili play error
Browse files Browse the repository at this point in the history
  • Loading branch information
listen1 committed Nov 10, 2022
1 parent 58f1d4e commit 5899c4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ function createWindow() {
"*://*.kuwo.cn/*",
"*://*.bilibili.com/*",
"*://*.bilivideo.com/*",
"*://*.bilivideo.cn/*",
"*://*.migu.cn/*",
"*://*.githubusercontent.com/*",
"https://listen1.github.io/listen1/callback.html?code=*",
Expand Down Expand Up @@ -536,6 +537,12 @@ function hack_referer_header(details) {
replace_origin = false;
add_origin = false;
}
if (details.url.includes('.bilivideo.cn')) {
referer_value = 'https://www.bilibili.com/';
origin_value = 'https://www.bilibili.com/';
add_referer = true;
add_origin = true;
}
if (details.url.includes(".migu.cn")) {
referer_value = "http://music.migu.cn/v3/music/player/audio?from=migu";
}
Expand Down

0 comments on commit 5899c4c

Please sign in to comment.