mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-07 06:52:11 +08:00
fix: 修复bug * 2
This commit is contained in:
4
main.py
4
main.py
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if (sys.version_info.major < 3 or sys.version_info.minor < 6):
|
if ((sys.version_info.major == 3 and sys.version_info.minor < 6) or sys.version_info.major == 2):
|
||||||
print('Python版本过低,请使用Python 3.6+ ')
|
print('Python版本过低,请使用Python 3.6+ ')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ logger = log.log("main")
|
|||||||
aiologger = log.log('aiohttp_web')
|
aiologger = log.log('aiohttp_web')
|
||||||
|
|
||||||
stopEvent = None
|
stopEvent = None
|
||||||
if (sys.version_info.minor < 8):
|
if (sys.version_info.minor < 8 and sys.version_info.major == 3):
|
||||||
logger.warning('您使用的Python版本已经停止更新,不建议继续使用')
|
logger.warning('您使用的Python版本已经停止更新,不建议继续使用')
|
||||||
import concurrent
|
import concurrent
|
||||||
stopEvent = concurrent.futures._base.CancelledError
|
stopEvent = concurrent.futures._base.CancelledError
|
||||||
|
@ -101,7 +101,7 @@ async def refresh():
|
|||||||
else:
|
else:
|
||||||
logger.error('未知的qqmusic_key格式')
|
logger.error('未知的qqmusic_key格式')
|
||||||
|
|
||||||
if (config.read_config('module.tx.user.refresh_login.enable') and not variable.use_cookie_pool):
|
if (config.read_config('module.tx.refresh_login.enable') and not variable.use_cookie_pool):
|
||||||
# changed refresh login config path
|
# changed refresh login config path
|
||||||
txconfig = config.read_config('module.tx')
|
txconfig = config.read_config('module.tx')
|
||||||
refresh_login_info = txconfig['refresh_login']
|
refresh_login_info = txconfig['refresh_login']
|
||||||
@ -109,10 +109,10 @@ if (config.read_config('module.tx.user.refresh_login.enable') and not variable.u
|
|||||||
txconfig.pop('refresh_login')
|
txconfig.pop('refresh_login')
|
||||||
config.write_config('module.tx', txconfig)
|
config.write_config('module.tx', txconfig)
|
||||||
|
|
||||||
|
if (config.read_config('module.tx.user.refresh_login.enable') and not variable.use_cookie_pool):
|
||||||
scheduler.append('qqmusic_refresh_login', refresh,
|
scheduler.append('qqmusic_refresh_login', refresh,
|
||||||
config.read_config('module.tx.user.refresh_login.interval'))
|
config.read_config('module.tx.user.refresh_login.interval'))
|
||||||
|
|
||||||
|
|
||||||
async def refresh_login_for_pool(user_info):
|
async def refresh_login_for_pool(user_info):
|
||||||
if (user_info['qqmusic_key'].startswith('W_X')):
|
if (user_info['qqmusic_key'].startswith('W_X')):
|
||||||
options = {
|
options = {
|
||||||
|
Reference in New Issue
Block a user