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.
17 lines
373 B
Bash
17 lines
373 B
Bash
3 years ago
|
#!/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
|