You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
419 B
Bash
18 lines
419 B
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# This script takes current playlist as `mpc` sees it and converts it into
|
|
# QuickPlay INI sections.
|
|
# Use at own risk :-)
|
|
|
|
|
|
mpc -f '[[%artist% - ]%title%]#|%file%' playlist | while IFS='|' read title file; do
|
|
if test -z "$title"; then
|
|
title="$(basename "$file")"
|
|
fi
|
|
|
|
# Unfortunately, the "time" attribute is currently required
|
|
echo -e "[$title]\npath = $file\ntime = 2:00\n"
|
|
done
|