Skip to content

Commit bb1250a

Browse files
authored
feat: Update URL replacing rules
1 parent c03faf1 commit bb1250a

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

class.json.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,19 @@ public function song_url($site, $music_id)
3838
// exit;
3939
// }
4040

41-
if ($site === "netease") {
42-
$url = str_replace('http://m9.', 'http://m7.', $url);
43-
$url = str_replace('http://m7c.', 'http://m7.', $url);
44-
$url = str_replace('http://m8c.', 'http://m7.', $url);
45-
$url = str_replace('http://m8.', 'http://m7.', $url);
46-
$url = str_replace('http://m7.', 'https://m7.', $url);
47-
$url = str_replace('http://m10', 'https://m10', $url);
41+
if ($site == 'netease') {
42+
$url = str_replace('://m7c.', '://m7.', $url);
43+
$url = str_replace('://m8c.', '://m8.', $url);
44+
$url = str_replace('http://', 'https://', $url);
45+
}
46+
if ($site == 'tencent') {
47+
$url = str_replace('http://', 'https://', $url);
48+
$url = str_replace('ws.stream.qqmusic.qq.com', 'dl.stream.qqmusic.qq.com', $url);
4849
}
49-
if ($site === "xiami" || $site === 'tencent') {
50+
if ($site == 'xiami') {
5051
$url = str_replace('http://', 'https://', $url);
5152
}
52-
if ($site === 'baidu') {
53+
if ($site == 'baidu') {
5354
$url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url);
5455
}
5556

hermit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Plugin Name: Hermit X
44
Plugin URI: https://blog.lwl12.com/read/hermit-x.html
55
Description: 音乐播放器 Hermit music player build for wordpress with APlayer
6-
Version: 2.9.8
6+
Version: 2.9.9
77
Author: Hermit X Developer Team
88
Author URI: https://blog.lwl12.com/read/hermit-x.html#developer
99
*/
1010

1111
define('HERMIT_FILE', __FILE__);
12-
define('HERMIT_VERSION', '2.9.8');
12+
define('HERMIT_VERSION', '2.9.9');
1313
define('HERMIT_URL', plugins_url('', __FILE__));
1414
define('HERMIT_PATH', dirname(__FILE__));
1515
define('HERMIT_ADMIN_URL', admin_url());

0 commit comments

Comments
 (0)