Files
plugins/Hermit/ajax.php
chorblack e75f275ef4
Some checks failed
定时更新GitHub源插件 / 自动更新GitHub插件 (push) Has been cancelled
Initial commit
2026-03-07 11:19:25 +08:00

42 lines
647 B
PHP

<?php
require dirname(__FILE__) . '/class.json.php';
if(!isset($HMTJSON)){
$HMTJSON = new HermitJson();
}
$scope = $_GET['scope'];
$id = $_GET['id'];
switch ($scope) {
case 'songs' :
$result = array(
'status' => 200,
'msg' => $HMTJSON->song_list($id)
);
break;
case 'album':
$result = array(
'status' => 200,
'msg' => $HMTJSON->album($id)
);
break;
case 'collect':
$result = array(
'status' => 200,
'msg' => $HMTJSON->collect($id)
);
break;
default:
$result = array(
'status' => 400,
'msg' => null
);
}
header('Content-type: application/json');
echo json_encode($result);
exit;