diff --git a/esv.d b/esv.d index e6ed9c4..4395de9 100644 --- a/esv.d +++ b/esv.d @@ -167,30 +167,30 @@ key = %s esv = new ESVApi(apiKey); if (aFlag) { - string tmpf, mpegPlayer; + string tmpf, player; try tmpf = esv.getAudioPassage(args[1], args[2]); catch (CurlException e) die(e.msg); - mpegPlayer = environment.get(cf.playerEnv, cf.mp3Player); + player = environment.get(cf.playerEnv, cf.mp3Player); /* check for an audio player */ enforceDie( executeShell( - format!"command -v %s >/dev/null 2>&1"(mpegPlayer) + format!"command -v %s >/dev/null 2>&1"(player) ).status == 0, - mpegPlayer ~ " is required for audio mode; cannot continue"); + player ~ " is required for audio mode; cannot continue"); /* esv has built-in support for mpg123 and mpv. * other players will work, just recompile with * the DEFAULT_MPEGPLAYER enum set differently * or use the ESV_PLAYER environment variable */ - mpegPlayer ~= - mpegPlayer == "mpg123" ? " -q " : - mpegPlayer == "mpv" ? " --msg-level=all=no " : " "; + player ~= + player == "mpg123" ? " -q " : + player == "mpv" ? " --msg-level=all=no " : " "; /* spawn the player */ - executeShell(mpegPlayer ~ tmpf); + executeShell(player ~ tmpf); return 0; }