Skip to content
Browse files

phish, gdradio, floyd

  • Loading branch information...
1 parent b3ee5d7 commit ea2fb4042b863ec95f4fa54baa0b24331d2c3f66 @substack committed
Showing with 20 additions and 5 deletions.
  1. +1 −1 package.json
  2. +10 −0 stations.json
  3. +9 −4 tuner.js
View
2 package.json
@@ -1,6 +1,6 @@
{
"name" : "tuner",
- "version" : "0.0.1",
+ "version" : "0.0.2",
"description" : "play a roster of internet radio stations",
"bin" : {
"tuner" : "tuner.js"
View
10 stations.json
@@ -33,5 +33,15 @@
"location" : "Ouray, Colorado",
"href" : "http://sc1.redmountainradio.com:80",
"website" : "http://www.mountainchill.com"
+ },
+ "phish live radio" : {
+ "href" : "http://radio.nugs.net:8002"
+ },
+ "gdradio" : {
+ "href" : "http://sc1-fmt.spacialnet.com:26260",
+ "website" : "http://gdradio.net"
+ },
+ "4 ever floyd" : {
+ "href" : "http://99.198.112.59:8000"
}
}
View
13 tuner.js
@@ -5,7 +5,7 @@ var stations = require('./stations.json');
var cmd = process.argv[2];
if (cmd === 'play') {
- play(stations[process.argv[3]]);
+ play(stations[process.argv.slice(3).join(' ')]);
}
else if (cmd === 'list') {
list();
@@ -13,8 +13,8 @@ else if (cmd === 'list') {
else if (cmd === 'search') {
search(process.argv.slice(3));
}
-else if (stations[cmd]) {
- play(stations[cmd]);
+else if (stations[process.argv.slice(2).join(' ')]) {
+ play(stations[process.argv.slice(2).join(' ')]);
}
else list();
@@ -41,7 +41,12 @@ function list () {
function show (name) {
var s = stations[name];
- return name + ' - ' + s.description + ' (' + s.location + ')';
+ return [ name,
+ [
+ s.description,
+ (s.location ? ' (' + s.location + ')' : '')
+ ].filter(Boolean).join(' ')
+ ].filter(Boolean).join(' - ');
}
function play (station) {

0 comments on commit ea2fb40

Please sign in to comment.
Something went wrong with that request. Please try again.