sync-music
A simple playlist-to-directory sync utility.
This utility has been created to make synchronising music from a machine to mobile devices easier.
To replicate my setup, you will need to install
Syncthing or similiar, and have it monitor
the output_dir
specified in the script.
You will then need to install Syncthing on your mobile device and point it at your desired directory. I ensure that only my machine is set as the Folder Master.
Notes
This has been developed with Python 3.4 and is completely untested on any other version.
If your output_dir
is on the same filesystem as your music_dir
then
sync-music
will hardlink your tracks to avoid duplication; otherwise it will
create copies of each track. Assuming both your music_dir
and output_dir
are
within your home directory, you don't need to worry about this.
Usage
- Download the
sync-music
script and put it somewhere in yourPATH
- Modify the
music_dir
andoutput_dir
values within the script - Run
sync-music
to create the initial directory structure foroutput_dir
- Export one or more M3U playlists to
output_dir/_Playlists
- Run
sync-music
to scan and sync the playlist tracks
When you want to re-sync, repeat steps 4 and 5.
usage: sync-music [-h] [-n] [-v]
sync playlist music tracks
optional arguments:
-h, --help show this help message and exit
-n, --dry-run run without making any changes
-v, --verbose show more output