尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证This little piece of insanity is a tool that transfers your ratings and playcounts between various players (iTunes, RhythmBox, and Amarok). Supports two-way synchronization in iTunes Mac, RhythmBox, Amarok, and Windows Media Player
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Transfer your ratings and play counts between music players: iTunes, Rhythmbox, Amarok, and Windows Media Player, with read-only support for Amazon Music.
File inputs are detected automatically: an iTunes XML library or a Rhythmbox rhythmdb.xml is recognized from its contents.
• Python 3
• lxml (all XML-based backends)
Extra packages are needed only for the backends you use:
This installs lxml plus the iTunes/WMP packages for your platform. The Amarok and Amazon Music packages are optional; uncomment them in requirements.txt (or pip install them directly) if you need them.查看完整 README ↗Transfer your ratings and play counts between music players: iTunes, Rhythmbox, Amarok, and Windows Media Player, with read-only support for Amazon Music.
| Player | How to specify it | Read | Write |
|---|---|---|---|
iTunes library XML (iTunes Music Library.xml) | path to the file | ✅ | ✅ |
Rhythmbox (rhythmdb.xml) | path to the file | ✅ | ✅ |
| iTunes on macOS (running instance) | itunes | ✅ | ✅ |
| iTunes on Windows (COM API) | itunes | ✅ | ✅ |
| Amarok (MySQL database) | mysql plus the Amarok options | ✅ | ✅ |
| Windows Media Player | wmp | ✅ | ✅ |
| Amazon Music desktop app (Windows) | amazonmusic | ✅ | ❌ |
File inputs are detected automatically: an iTunes XML library or a Rhythmbox rhythmdb.xml is recognized from its contents.
Extra packages are needed only for the backends you use:
| Backend | Package | Installed by requirements.txt |
|---|---|---|
| iTunes on macOS | pyobjc-framework-ScriptingBridge | Yes, on macOS |
| iTunes on Windows, Windows Media Player | pywin32 | Yes, on Windows |
| Amarok | mysqlclient (provides MySQLdb) | No, optional |
| Amazon Music | rleveldb | No, optional |
git clone https://github.com/esanbock/ITunesToRhythm.git
cd ITunesToRhythm
pip install -r requirements.txt
This installs lxml plus the iTunes/WMP packages for your platform. The Amarok and Amazon Music packages are optional; uncomment them in requirements.txt (or pip install them directly) if you need them.
python iTunesToRhythm.py [options] <source> <destination>
<source> and <destination> can each be a file path or one of itunes, mysql, wmp, amazonmusic.
For every song in the destination, the tool looks for the matching song in the source, by file size by default, then copies the rating and play count across.
Nothing is written unless you pass
-w. Without it the tool runs as a dry run and prints what it would change. Back up your library files before writing to them.
| Option | Description |
|---|---|
-w, --writechanges | Write changes to the destination (otherwise a dry run) |
-a, --disambiguate | Prompt you to pick the right song when a match is ambiguous |
-c, --confirm | Pause after every match for confirmation |
-l, --fastandloose | Accept a single file-size match even if the titles differ |
--useSongTitle | Match songs by title instead of file size |
--noratings | Don't update ratings |
--noplaycounts | Don't update play counts |
--twoway | Sync both directions; for each song, the copy with the higher play count wins |
--dateadded | Also copy the "date added" field (iTunes to Rhythmbox only) |
--playdate | Also copy the "last played" date (between iTunes library files and Rhythmbox only) |
Amarok connection options, used with mysql:
| Option | Description |
|---|---|
-s, --server | MySQL server host name |
-d, --database | Amarok database name |
-u, --username | Database user |
-p, --password | Database password |
Copy or mount your music somewhere Rhythmbox can see it. The folder structure doesn't matter.
Import the music into Rhythmbox, then close Rhythmbox so it doesn't overwrite the database.
Copy your iTunes Music Library.xml to the Linux machine.
Do a dry run and review the output:
python iTunesToRhythm.py -a "iTunes Music Library.xml" ~/.local/share/rhythmbox/rhythmdb.xml
Run it again with -w to save the changes:
python iTunesToRhythm.py -w -a "iTunes Music Library.xml" ~/.local/share/rhythmbox/rhythmdb.xml
At the end of each run a summary shows how many songs matched fully, partially, ambiguously, or not at all.
Copy play counts (not ratings) from Rhythmbox to an Amarok MySQL database:
python iTunesToRhythm.py -w --noratings -a ~/.local/share/rhythmbox/rhythmdb.xml mysql -s musicserver -d amarok -u amarokuser -p verysecret
Copy ratings and play counts from Amarok into iTunes on a Mac:
python iTunesToRhythm.py -w mysql -s musicserver -d amarok -u amarokuser -p verysecret itunes
Sync iTunes and Windows Media Player both ways on Windows:
python iTunesToRhythm.py -w --twoway itunes wmp
--useSongTitle.rhythmdb.xml, or it may overwrite your changes when it exits.Each backend module can also be run on its own to print a library's contents, which helps when debugging matches:
python dumpitunes.py "iTunes Music Library.xml"
python dumpAmazonMusic.py
The tests use only the standard library and small sample libraries in tests/fixtures, so they never touch your real music libraries:
python -m unittest discover -s tests
Code is formatted with Black (settings in pyproject.toml): python -m black .
GNU General Public License v3. See LICENSE.txt.
Found a bug or have a feature request? Open an issue.