From 67167e6fb6cdaa9885eed14489741fe5634dc584 Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Wed, 10 Aug 2016 15:28:47 +0000 Subject: psycamp "A" key: select some tracks for later --- bin/psycamp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/psycamp b/bin/psycamp index 88c546e..14c9607 100755 --- a/bin/psycamp +++ b/bin/psycamp @@ -684,6 +684,7 @@ X /^(l|list)\b\s*(\S*)$/ and system("ls $2"), next; /^(h|help)\b/ and &help, &printinfo, next; /^H\b/ and &help2, &printinfo, next; + /^(A|add)\b/ and &addtolist, next; /^(e|edit)\b/ and &edit($CS), next; if ( /^\s*(.....+)\s*\b(\S*)\s*\b(\S*)\s*$/ and -r $1 ) { @@ -1365,6 +1366,16 @@ sub edit { &printinfo; } +sub addtolist { + if (open(A, ">>playlist.m3u")) { + print A "$CurrentFile\n"; + close A; + print YELLOW, "\rAdded $CurrentFile to ./playlist.m3u \n", RESET; + return; + } + print RED, "\rCould not write to ./playlist.m3u \n", RESET; +} + sub help { print BOLD, BLACK, &head, RESET, <