1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-27 15:36:49 +00:00
dotfiles/bin/hitolo

25 lines
608 B
Plaintext
Raw Normal View History

#!/bin/sh
HIFI=~/Music/HiFi
LOFI=/tmp/foo
test -f /usr/share/man/man3/Parallel::ForkManager.3pm || sudo eopkg it perl-parallel-forkmanager
if test $# -eq 0; then
mkdir "$LOFI"
fusermount -u "$LOFI"
ifuse --documents com.foobar2000.mobile "$LOFI" || exit 1
else
LOFI=$1
fi
2021-03-27 22:37:14 +00:00
if ! test -d "$LOFI"; then
cd "$HIFI" || exit 1
fd -t d -x mkdir -p "$LOFI"/{}
fd -e flac -x opusenc --bitrate 128 {} "$LOFI"/'{.}'.opus
fi
# https://github.com/smxi/acxi/raw/stable/acxi
acxi -s "$HIFI" -d "$LOFI" -o opus -q 128 --clean sync -F 16 -c mp3,m4a,opus,ogg
2021-03-27 22:37:14 +00:00
fusermount -u "$LOFI"
rmdir "$LOFI"