Skip to content

Commit

Permalink
feat: Update URL replacing rules
Browse files Browse the repository at this point in the history
  • Loading branch information
fly3949 committed Jan 23, 2021
1 parent c03faf1 commit bb1250a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions class.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ public function song_url($site, $music_id)
// exit;
// }

if ($site === "netease") {
$url = str_replace('http://m9.', 'http://m7.', $url);
$url = str_replace('http://m7c.', 'http://m7.', $url);
$url = str_replace('http://m8c.', 'http://m7.', $url);
$url = str_replace('http://m8.', 'http://m7.', $url);
$url = str_replace('http://m7.', 'https://m7.', $url);
$url = str_replace('http://m10', 'https://m10', $url);
if ($site == 'netease') {
$url = str_replace('://m7c.', '://m7.', $url);
$url = str_replace('://m8c.', '://m8.', $url);
$url = str_replace('http://', 'https://', $url);
}
if ($site == 'tencent') {
$url = str_replace('http://', 'https://', $url);
$url = str_replace('ws.stream.qqmusic.qq.com', 'dl.stream.qqmusic.qq.com', $url);
}
if ($site === "xiami" || $site === 'tencent') {
if ($site == 'xiami') {
$url = str_replace('http://', 'https://', $url);
}
if ($site === 'baidu') {
if ($site == 'baidu') {
$url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url);
}

Expand Down
4 changes: 2 additions & 2 deletions hermit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Plugin Name: Hermit X
Plugin URI: https://blog.lwl12.com/read/hermit-x.html
Description: 音乐播放器 Hermit music player build for wordpress with APlayer
Version: 2.9.8
Version: 2.9.9
Author: Hermit X Developer Team
Author URI: https://blog.lwl12.com/read/hermit-x.html#developer
*/

define('HERMIT_FILE', __FILE__);
define('HERMIT_VERSION', '2.9.8');
define('HERMIT_VERSION', '2.9.9');
define('HERMIT_URL', plugins_url('', __FILE__));
define('HERMIT_PATH', dirname(__FILE__));
define('HERMIT_ADMIN_URL', admin_url());
Expand Down

0 comments on commit bb1250a

Please sign in to comment.