已支持配置自定义网络歌单,在这里分享你的歌单
hanxi opened this issue · comments
涵曦 commented
设置页面新增一个输入框配置json格式,可以定义配置音乐源,可以是电台或者其他的m3u8格式的。
再加一个输入框配置这个json文件的url,点击获取按钮把url对应的json内容填充到json输入框,方便直接使用别人分享的歌单。
比如这样的链接
已经测试能播放出来:
python3 micli.py play http://ngcdn001.cnr.cn/live/zgzs/index.m3u8
预计歌单格式是这样的, type 为 radio 作为电台的设定,会一直播放当前电台,不会播放下一首。
[
{
"name":"歌单1",
"musics":[
{
"name":"歌名1",
"url":"http://ngcdn001.cnr.cn/live/zgzs/index.m3u8",
"type":"radio"
},
{
"name":"歌名2",
"url":"https://lhttp.qtfm.cn/live/4915/64k.mp3"
}
]
},
{
"name":"歌单2",
"musics":[
{
"name":"歌名3",
"url":"https://lhttp.qtfm.cn/live/4915/64k.mp3"
},
{
"name":"歌名4",
"url":"https://lhttp.qtfm.cn/live/4915/64k.mp3"
}
]
}
]
涵曦 commented
可以使用 gist 来配置和分享 json 文件,比如 https://gist.github.com/hanxi/dda82d964a28f8110f8fba81c3ff8314
点击 raw 得到 json 文件的链接 https://gist.githubusercontent.com/hanxi/dda82d964a28f8110f8fba81c3ff8314/raw/8787844d81c39dbfaad4e37954dd449d8bba5728/example.json
当然还可以用其他工具分享json文件,比如 github 和国内的 gitee 。