aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>2016-08-10 15:28:47 +0000
committerpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>2016-08-10 15:28:47 +0000
commit67167e6fb6cdaa9885eed14489741fe5634dc584 (patch)
treeeb30159acf5b18c9101b1a54f066ff52e3660b10
parent30cfe4a53d809057390a79a7ed69cefb11ecfeeb (diff)
downloadperlpsyc-67167e6fb6cdaa9885eed14489741fe5634dc584.tar.gz
perlpsyc-67167e6fb6cdaa9885eed14489741fe5634dc584.zip
psycamp "A" key: select some tracks for later
-rwxr-xr-xbin/psycamp14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/psycamp b/bin/psycamp
index 88c546e..14c9607 100755
--- a/bin/psycamp
+++ b/bin/psycamp
@@ -684,6 +684,7 @@ X
684 /^(l|list)\b\s*(\S*)$/ and system("ls $2"), next; 684 /^(l|list)\b\s*(\S*)$/ and system("ls $2"), next;
685 /^(h|help)\b/ and &help, &printinfo, next; 685 /^(h|help)\b/ and &help, &printinfo, next;
686 /^H\b/ and &help2, &printinfo, next; 686 /^H\b/ and &help2, &printinfo, next;
687 /^(A|add)\b/ and &addtolist, next;
687 /^(e|edit)\b/ and &edit($CS), next; 688 /^(e|edit)\b/ and &edit($CS), next;
688 689
689 if ( /^\s*(.....+)\s*\b(\S*)\s*\b(\S*)\s*$/ and -r $1 ) { 690 if ( /^\s*(.....+)\s*\b(\S*)\s*\b(\S*)\s*$/ and -r $1 ) {
@@ -1365,6 +1366,16 @@ sub edit {
1365 &printinfo; 1366 &printinfo;
1366} 1367}
1367 1368
1369sub addtolist {
1370 if (open(A, ">>playlist.m3u")) {
1371 print A "$CurrentFile\n";
1372 close A;
1373 print YELLOW, "\rAdded $CurrentFile to ./playlist.m3u \n", RESET;
1374 return;
1375 }
1376 print RED, "\rCould not write to ./playlist.m3u \n", RESET;
1377}
1378
1368sub help { print BOLD, BLACK, &head, RESET, <<X, &sep('='); } 1379sub help { print BOLD, BLACK, &head, RESET, <<X, &sep('='); }
1369 1380
1370basics: (q)uit (h)elp 1381basics: (q)uit (h)elp
@@ -1380,7 +1391,8 @@ files: (o)pen <file> immediately load this new song
1380 (n)ext next file from playlist 1391 (n)ext next file from playlist
1381 '?' show a list of the next 9 tracks in the queue 1392 '?' show a list of the next 9 tracks in the queue
1382 (w)rite or (e)dit playlist 1393 (w)rite or (e)dit playlist
1383 e(x)it exit without updating playlist 1394 (A)dd to local ./playlist.m3u select some tracks for later
1395 e(x)it exit without updating playlist
1384 1396
1385volume: (v)olume [0..100] default is maximum volume 1397volume: (v)olume [0..100] default is maximum volume
1386 v+ v- increase or decrease volume a bit 1398 v+ v- increase or decrease volume a bit