Code Monkey home page Code Monkey logo

lrcapi's Introduction

LrcApi

A Flask API For StreamMusic

功能

支持酷狗API获取LRC歌词、支持缓存、支持指定端口

已经打包了Linux_x86的程序,直接启动即可

其它环境也可以安装依赖之后启动app.py

默认监听28883端口,API地址0.0.0.0:28883/lyrics

启动参数

参数 类型 默认值
--port int 28883
--auth str

--auth参数用于header鉴权,留空则跳过鉴权。验证header中的AuthorizationAuthentication字段。如果鉴权不符合,则返回403响应。

也可以使用环境变量API_AUTH定义,其优先性低于--auth参数,但是更容易在Docker中部署。

食用方法:

二进制文件:

上传至运行目录,./lrcapi --port 8080 --auth DbG91ZEZbBgNVBAs

Python源文件:

拉取本项目;或者下载后上传至运行目录,解压tar.gz

安装依赖:pip install -r requirements.txt

启动服务:python3 app.py --port 8080 --auth DbG91ZEZbBgNVBAs

Linux_x86一键部署运行:

wget https://mirror.eh.cx/lrcapi/lrcapi.sh -O lrcapi.sh && chmod +x lrcapi.sh && sudo bash lrcapi.sh

Docker部署方式

docker run -d -p 28883:28883 -v /home/user/music:/music hisatri/lyricapi:latest -e API_AUTH=DbG91ZEZbBgNVBAs

或者,请指定一个Tag(推荐)

docker run -d -p 28883:28883 -v /home/user/music:/music hisatri/lyricapi:alpine-py1.1 -e API_AUTH=DbG91ZEZbBgNVBAs

非常不建议使用Docker部署Navidrome以及LRCAPI,但是如果你非要这么做,我也提供了以下的教程:

如果你正在使用Navidrome Docker,请将 /home/user/music:/music 中的 /home/user/music 修改为你在Navidrome中映射的主机路径。

如果你正在使用Navidrome(真的有人会本地部署Navidrome了,然后用Docker部署这东西?),请将你的音乐文件目录映射到Docker内目录;例如如果你音乐存储的目录是/www/path/music,请将启动命令中的映射修改为 /www/path/music:/www/path/music

然后访问http://0.0.0.0:28883/lyrics,或者使用Nginx或Apache进行反向代理及部署SSL证书。

lrcapi's People

Contributors

hisatri avatar zaneyork avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.