You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following script (dead2m3u.sh) which i call from deadbeef shell command like this
dead2m3u.sh %F. The problem is that if i select two or more files from deadbeef it asks dialogs as many times as there is selected files. Same script run from Thunar shell command with same call asks dialogs only once as it should. What can be done to make it work same in deadbeef?
ok=true;
cur=0;
for file in "$@";
do
if [ "$cur" = 0 ]; then
lista=$(kdialog --title "Input dialog" --inputbox "Give .m3u filename without extension" "$lista");
kdialog --yesno "Save chosen into list $lista$tarkenne ?";
if [ "$?" = 0 ]; then
ok=true;
else
ok=false;
fi
fi
if [ "$ok" = true ]; then
echo "$file" >> "$polku$lista$tarkenne";
fi
let cur++;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following script (dead2m3u.sh) which i call from deadbeef shell command like this
dead2m3u.sh %F. The problem is that if i select two or more files from deadbeef it asks dialogs as many times as there is selected files. Same script run from Thunar shell command with same call asks dialogs only once as it should. What can be done to make it work same in deadbeef?
#!/bin/bash
lista="uusi-";
tarkenne=".m3u";
polku="/home/jj/m3u/soittolistat/";
ok=true;
cur=0;
for file in "$@";
do
if [ "$cur" = 0 ]; then
lista=$(kdialog --title "Input dialog" --inputbox "Give .m3u filename without extension" "$lista");
kdialog --yesno "Save chosen into list $lista$tarkenne ?";
if [ "$?" = 0 ]; then
ok=true;
else
ok=false;
fi
fi
done
Beta Was this translation helpful? Give feedback.
All reactions