From e9bf20106585a54c16860e3f957e2fa14d3ccd8f Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 18 Jul 2022 02:10:58 +0300 Subject: [PATCH] implement transcode switcher --- funkwhale-cli.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/funkwhale-cli.sh b/funkwhale-cli.sh index a1b611f..768699a 100755 --- a/funkwhale-cli.sh +++ b/funkwhale-cli.sh @@ -405,6 +405,17 @@ funkwhale_pseudofs_load() done } +funkwhale_pseudofs_transcode_switch() +{ + echo "Transcode to" + transcode_ch=$(echo "none\nogg\nmp3" | fzy) + if [ "$transcode_ch" = 'none' ]; then + find "fwfs_$instance" -type f -exec sed -i 's/to=.*/to=/' {} + + else + find "fwfs_$instance" -type f -exec sed -i "s/to=.*/to=$transcode_ch/" {} + + fi +} + trackspls='Tracks' albumsmenu='Albums' artistmenu='Artists'