mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
chore: Merge
This commit is contained in:
commit
7f852e05ab
@ -1,10 +1,13 @@
|
||||
FROM python:3.10.13-slim-bullseye
|
||||
FROM python:3.10-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
COPY ./main.py .
|
||||
COPY ./common ./common
|
||||
COPY ./modules ./modules
|
||||
COPY ./requirements.txt .
|
||||
|
||||
# 指定源, 如果后期源挂了, 更换个源就可以.
|
||||
RUN pip install --no-cache -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt
|
||||
|
||||
CMD [ "python", "main.py" ]
|
||||
CMD [ "python", "main.py" ]
|
||||
|
@ -77,7 +77,7 @@ async def handleApiRequest(command, source, songId, quality):
|
||||
}
|
||||
try:
|
||||
result = await func(songId, quality)
|
||||
logger.debug(f'获取{source}_{songId}_{quality}成功,URL:{result['url']}')
|
||||
logger.debug(f'获取{source}_{songId}_{quality}成功,URL:{result["url"]}')
|
||||
|
||||
canExpire = sourceExpirationTime[source]['expire']
|
||||
expireTime = sourceExpirationTime[source]['time'] + int(time.time())
|
||||
@ -86,7 +86,7 @@ async def handleApiRequest(command, source, songId, quality):
|
||||
"time": expireTime,
|
||||
"url": result['url'],
|
||||
})
|
||||
logger.debug(f'缓存已更新:{source}_{songId}_{quality}, URL:{result['url']}, expire: {expireTime}')
|
||||
logger.debug(f'缓存已更新:{source}_{songId}_{quality}, URL:{result["url"]}, expire: {expireTime}')
|
||||
|
||||
return {
|
||||
'code': 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user