diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 16 | ||||
| -rw-r--r-- | src/pianobar.1 | 4 | 
2 files changed, 19 insertions, 1 deletions
| @@ -511,7 +511,7 @@ int main (int argc, char **argv) {  		/* in the meantime: wait for user actions */  		struct pollfd polls = {fileno (stdin), POLLIN, POLLIN};  		char buf, yesnoBuf; -		char *lineBuf, *musicId; +		char *lineBuf, *musicId, *explanation;  		PianoStation_t *moveStation;  		if (poll (&polls, 1, 1000) > 0) { @@ -522,6 +522,7 @@ int main (int argc, char **argv) {  							"b\tban current song\n"  							"c\tcreate new station\n"  							"d\tdelete current station\n" +							"e\texplain why this song is played\n"  							"g\tadd genre station\n"  							"l\tlove current song\n"  							"n\tnext song\n" @@ -597,6 +598,19 @@ int main (int argc, char **argv) {  					}  					break; +				case 'e': +					if (curSong == NULL) { +						BarUiMsg ("No song playing.\n"); +						break; +					} +					BarUiMsg ("Receiving explanation... "); +					if (BarUiPrintPianoStatus (PianoExplain (&ph, curSong, +							&explanation)) == PIANO_RET_OK) { +						printf ("%s\n", explanation); +						free (explanation); +					} +					break; +  				case 'g':  					/* use genre station */  					BarStationFromGenre (&ph); diff --git a/src/pianobar.1 b/src/pianobar.1 index 5cf9983..bd0db3c 100644 --- a/src/pianobar.1 +++ b/src/pianobar.1 @@ -35,6 +35,10 @@ artist of your choice.  Delete current station.  .TP +.B e +Explain why this song is played. + +.TP  .B g  Add genre station provided by pandora. | 
