Simple script to update m3u playlists for local playback
- Python 3.7+
Place update_playlists.py
in your path and make it executable.
For example:
$> cp update_playlists.py /usr/local/bin/update_playlists
$> chmod +x /usr/local/bin/update_playlists
usage: update_playlists [-h] [-m OLDMUSICDIR LOCALMUSICDIR] [-f | -u]
[--preserve-old-comments]
playlist_dir output_dir
Copy m3u(8) playlists and update the track paths.
positional arguments:
playlist_dir Path to read m3u files from.
output_dir Path to write m3u files to.
optional arguments:
-h, --help show this help message and exit
-m OLDMUSICDIR LOCALMUSICDIR, --replace_music_dir OLDMUSICDIR LOCALMUSICDIR
Replace OLDMUSICDIR with LOCALMUSICDIR on each track.
-f, --overwrite Overwrite existing playlists.
-u, --update-only Overwrite only if source is newer than destination.
--preserve-old-comments
Preserves pre-exsisting comments present in the output
file and in the correct relative location.