Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sangazh committed Jan 6, 2021
1 parent 96886f9 commit 4ff7e08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ title = "Xiami and Last.fm Example"
recording = "/recording"

[xiami]
file = "xiami/song.json"
file = "song.json"
23 changes: 5 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
# Intro
Yet another go project to scrobble your xiami recent songs to last.fm.
虾米服务将于2月5日停止。官方提供了用户数据的导出,包括收藏歌单、专辑、艺人、歌曲。
只有收藏的歌曲能对应last.fm的 `track.love` API了。

* Scrobbling now
* Recent played

设定为每分钟去爬一次虾米主页里的最近播放歌曲,1小时以前的都会放弃,因为时间不准确了。
本分支 `export` 可以把导出的 `id_song.json` 文件解析同步到last.fm上。

# How to use
1. 随便创建一个目录,
2. 下载 `xiamiScrobble` 放进去
3. 下载 `config.example.toml` 放进去,并重命名为 `config.toml`
4. 在该目录下执行
4.`id_song.json` 重命名为 `song.json` 放进去。
5. 在该目录下执行
```
chmod +x xiamiScrobble
./xiamiScrobble
```
5. 按照提示,输入虾米主页url
6. 按照提示,打开last.fm的授权页。
7. Done!
8. Ctrl+C 退出
# 同步不成功?
有时出现获取album失败,需要验证你是机器。有时需要登录,可能需要登录。那么脚本访问是需要Cookie。`config.toml`文件里有几个cookie的key,你可以填入相应的值。或者你可以加入其它key,动态载入。
# Todo
* [x] MusicBiz Track ID
* [ ] 后台跑的进程怎么正常退出?
* [ ] 虾米album拿不到通过MusicBiz去查
1 change: 1 addition & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
cd ~/go/src/xiamiToLastfm
./xiamiScrobble >> log/cmd-`date +%Y-%m-%d`.log

Binary file modified xiamiScrobble
Binary file not shown.

0 comments on commit 4ff7e08

Please sign in to comment.