forked from metowolf/Meting-API
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d49410
commit 2b19e55
Showing
7 changed files
with
82 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,30 +26,65 @@ Meting后端的api结构较为复杂,基础是一个[接口](https://github.co | |
- 采用jsonp解决Tencent系地区限制 | ||
- 插件系统,编写新接口及音源简单 | ||
|
||
## api网址 | ||
https://meting-dd.2333332.xyz/api => Deno Deploy | ||
## 进度 | ||
|
||
https://meting-ve.2333332.xyz/api => vercel | ||
| | server参数名称 | 单曲/song | 歌单/playlist | | ||
| ------------- | -------------- | --------- | ------------- | | ||
| 网易云 | netease | √ | √ | | ||
| qq音乐 | tencent | √ | √ | | ||
| youtube music | ytmusic | √ | √ | | ||
| more.. | | | | | ||
|
||
https://m.boochinoob.shop/api => cloudflare (deprecated, see below) | ||
## 地区限制 | ||
|
||
可自行测试,如 https://meting-dd.2333332.xyz/test | ||
### 部署在国外 | ||
|
||
## 进度 | ||
| 客户端/浏览器访问地区 | 国内 | 国外 | | ||
| --------------------- | ---- | ---- | | ||
| 网易云 | √ | √ | | ||
| qq音乐 | √¹ | × | | ||
| youtube music | √² | √ | | ||
|
||
**从国内访问** | ||
### 部署在国内 | ||
|
||
| | 单曲/song | 歌单/playlist | 地区限制 | | ||
| ------ | --------- | ------------- | -------- | | ||
| 网易云 | √ | √ | 无 | | ||
| qq音乐 | √ | √ | 无* | | ||
| more | | | | | ||
| 客户端/浏览器访问地区 | 国内 | 国外 | | ||
| --------------------- | ---- | ---- | | ||
| 网易云 | √ | √ | | ||
| qq音乐 | √ | × | | ||
| youtube music | √² | √ | | ||
|
||
\*使用jsonp,**需要替换前端插件**, https://cdn.jsdelivr.net/npm/[email protected]/dist/Meting.min.js => https://cdn.jsdelivr.net/npm/@xizeyoupan/meting@latest/dist/Meting.min.js , or | ||
¹使用jsonp,**需要替换前端插件**, https://cdn.jsdelivr.net/npm/[email protected]/dist/Meting.min.js => https://cdn.jsdelivr.net/npm/@xizeyoupan/meting@latest/dist/Meting.min.js , or | ||
https://unpkg.com/[email protected]/dist/Meting.min.js => https://unpkg.com/@xizeyoupan/meting@latest/dist/Meting.min.js | ||
|
||
More info https://github.com/xizeyoupan/MetingJS | ||
|
||
²见下方参数配置 | ||
|
||
## 参数配置 | ||
以下参数均由环境变量配置 | ||
|
||
- YT_API | ||
默认的youtube music api地址。youtube music的可用性取决于YT_API的连通性。已经内置了一个。如果你需要自己部署youtube music api,[此仓库](https://github.com/xizeyoupan/ytmusic-api-server)提供示例。注:youtube music api必须部署在国外! | ||
- OVERSEAS | ||
用于判断是否部署于国外。设为1会启用qq音乐的jsonp返回,同时需要替换[前端插件](https://github.com/xizeyoupan/MetingJS),能实现国内访问国外api服务解析qq音乐。部署在国内不用设置这个选项。当部署到vercel上时,此选项自动设为1。 | ||
- PORT | ||
api监听端口,也是docker需要映射的端口。默认3000 | ||
- UID | ||
用于docker,默认1010 | ||
- GID | ||
用于docker,默认1010 | ||
|
||
## api网址 | ||
仅为示例,不保证稳定性 | ||
|
||
https://meting-dd.2333332.xyz/api => Deno Deploy | ||
|
||
https://meting-ve.2333332.xyz/api => vercel | ||
|
||
https://m.boochinoob.shop/api => cloudflare (deprecated, see below) | ||
|
||
可自行测试,如 https://meting-dd.2333332.xyz/test | ||
|
||
## 部署 | ||
|
||
部署 Meting-API 需要基本的计算机编程常识,如果您在部署过程中遇到无法解决的问题请到 issues 向我们提问,我们会尽快给您答复。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import config from "../../config.js" | ||
const support_type = ['song', 'playlist'] | ||
const YT_API = config.YT_API | ||
const handle = async (type, id, cookie = '') => { | ||
let result | ||
const query = `?type=${type}&id=${id}` | ||
if (support_type.includes(type)) { | ||
result = await fetch(YT_API + query) | ||
result = await result.json() | ||
} else { | ||
result = -1 | ||
} | ||
|
||
return result | ||
} | ||
|
||
export default { | ||
register: (ctx) => { | ||
ctx.register('ytmusic', { handle, support_type }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b19e55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
meting-api – ./
meting-api-git-main-xizeyoupan.vercel.app
meting-api-omega.vercel.app
meting-ve.2333332.xyz
meting-api-xizeyoupan.vercel.app