[DEPRECIATED] xiami & last.fm auto scrobbler. 自动同步虾米播放记录到 last.fm
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
static
templates
.gitignore
README.md
album.py
config-example.py
database.py
flaskrun.py
index.py
pip-req.txt
pylast.py
scheduler.py
scrobble.py
scrobble.sql
user.py
xiami_auto_comment.py

README.md

xiami2lastfm


cp config-example.py config.py 

vim config.py

edit mysql_passwd, API_KEY and API_SECRET .

import scrobble.sql into mysql.

mysql.server start

development:

python index.py

running on http://127.0.0.1:5000/

production:

pm2 start index.py --name xiami

restart:

pm2 restart index.py --update-env

部署备忘:

阿里云上用 python 启动:端口 5000(调试用):

python index.py --host 127.0.0.1 --port 5000

直接访问 123.57.21.239:5000 是不行的。通过 linode 的 nginx 指向了阿里云 nginx 80 端口,aliyun nginx 监听 80 端口,然后再指向 5000 ,流程:

http://xiami2lastfm.han.im/ => 123.57.21.239:80 => 123.57.21.239:5000

报错:

[root@iZ25677w1axZ xiami2lastfm]# nginx -s reload
nginx: [error] invalid PID number "" in "/run/nginx.pid"

解决:

/usr/sbin/nginx -c /etc/nginx/nginx.conf