Skip to content

Commit

Permalink
V1.3
Browse files Browse the repository at this point in the history
* 修复 部分逻辑问题导致的 BUG
- 移除内置 API,需要自行部署可上 GitHub 下载
  • Loading branch information
fghrsh committed Apr 21, 2017
1 parent 2d44210 commit c99005b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/aplayer_music_api.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php require dirname(__FILE__).'/NeteaseMusicAPI_mini.php';
<?php require 'NeteaseMusicAPI_mini.php';

class aplayer_music_api {
function url($id) {
Expand Down
2 changes: 1 addition & 1 deletion api/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php require dirname(__FILE__).'/aplayer_music_api.php';
<?php require 'aplayer_music_api.php';

$api = new aplayer_music_api(); $switch = explode('.', $_GET['id']); $id = $switch[0]; $mix = $switch[2];
$url = str_replace('?'.$_SERVER["QUERY_STRING"], '', check_https('http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]));
Expand Down
1 change: 0 additions & 1 deletion function.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
require dirname(__FILE__).'/api/aplayer_music_api.php';

class aplayer_class
{
Expand Down
2 changes: 1 addition & 1 deletion include.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function APlayer_Filter_Plugin_Zbp_MakeTemplatetags() {
function InstallPlugin_APlayer() {
global $zbp,$obj,$bucket;
if (!$zbp->Config('APlayer')->HasKey('theme')) {
$zbp->Config('APlayer')->api = $zbp->host.'zb_users/plugin/APlayer/api/';
$zbp->Config('APlayer')->api = 'https://api.fghrsh.net/music/aplayer_music_api/';
$zbp->Config('APlayer')->narrow = 0;
$zbp->Config('APlayer')->autoplay = 0;
$zbp->Config('APlayer')->mutex = 1;
Expand Down
14 changes: 5 additions & 9 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
if(empty($api)){
$zbp->ShowHint('bad', 'API 地址不允许为空!');
} else {
if (!$api == ($zbp->Config('APlayer')->api)) {
if ($api != ($zbp->Config('APlayer')->api)) {
$zbp->Config('APlayer')->api = $api;
$tips = 'API 地址设置成功';
$tips = 'API 地址设置成功;';
}
}
$mutex = in_array('mutex', $options) ? 1 : 0;
Expand Down Expand Up @@ -52,14 +52,10 @@
}
$zbp->SaveConfig('APlayer');

if ( isset($tips) ) {
if (!empty($tips)) {
$tips = explode(";",$tips);
for ($i=0;$i<count($tips)-1;$i++) {
$zbp->ShowHint('good', $tips[$i]);
}
} else {
$zbp->ShowHint('bad', '设置未更改');
}
for ($i=0;$i<count($tips)-1;$i++) $zbp->ShowHint('good', $tips[$i]);
} else $zbp->ShowHint('bad', '设置未更改');
}
?>
<link rel="stylesheet" href="jcolor/jcolor.min.css" type="text/css" />
Expand Down

0 comments on commit c99005b

Please sign in to comment.