Add automatic INI generator
parent
0314ef1389
commit
d340e8fc35
@ -0,0 +1,16 @@
|
|||||||
|
#!/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%#|%time%' playlist | while IFS='|' read title file time; do
|
||||||
|
if test -n "$title"; then
|
||||||
|
title="$(basename "$title")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "[$title]\npath = $file\ntime = $time\n"
|
||||||
|
done
|
Loading…
Reference in New Issue