diff options
author | mrg <mrg@pkgsrc.org> | 2004-05-02 07:24:51 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 2004-05-02 07:24:51 +0000 |
commit | 2ef6e84c133304e692eee276b2543ef84e241685 (patch) | |
tree | a71cf75e024d3353d76aa0174dc694623ea9ca63 /audio/mpc | |
parent | a2e1f5d38010a0f489fda1c276c634d52c40b0b5 (diff) | |
download | pkgsrc-2ef6e84c133304e692eee276b2543ef84e241685.tar.gz |
add a "playpause" command, ala "xmms -t".
this has already been submitted to musicpd.org.
Diffstat (limited to 'audio/mpc')
-rw-r--r-- | audio/mpc/distinfo | 5 | ||||
-rw-r--r-- | audio/mpc/patches/patch-aa | 23 | ||||
-rw-r--r-- | audio/mpc/patches/patch-ab | 13 | ||||
-rw-r--r-- | audio/mpc/patches/patch-ac | 13 |
4 files changed, 53 insertions, 1 deletions
diff --git a/audio/mpc/distinfo b/audio/mpc/distinfo index 9d0bb39135c..81279a225d8 100644 --- a/audio/mpc/distinfo +++ b/audio/mpc/distinfo @@ -1,4 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2004/04/30 10:49:25 grant Exp $ +$NetBSD: distinfo,v 1.2 2004/05/02 07:24:51 mrg Exp $ SHA1 (mpc-0.10.3.tar.gz) = 377ea125332c27b2ba18cb22889a6a8809b2efcd Size (mpc-0.10.3.tar.gz) = 209661 bytes +SHA1 (patch-aa) = 2df86841103b59e3c9c48750c895cc73ad05ae14 +SHA1 (patch-ab) = 5a8c0d963f35d1963a13d5c5354dffe4c6214e8e +SHA1 (patch-ac) = d2492ba406a7202df2d0157f3ee728ca1bc2cc95 diff --git a/audio/mpc/patches/patch-aa b/audio/mpc/patches/patch-aa new file mode 100644 index 00000000000..5e44ce84c78 --- /dev/null +++ b/audio/mpc/patches/patch-aa @@ -0,0 +1,23 @@ +$NetBSD: patch-aa,v 1.1 2004/05/02 07:24:52 mrg Exp $ + +diff -ru src/command.c mpc-0.10.3.orig/src/command.c +--- src/command.c 2004-03-20 10:40:02.000000000 +1100 ++++ src/command.c 2004-05-02 16:49:23.000000000 +1000 +@@ -228,6 +228,17 @@ + return 1; + } + ++int cmd_playpause ( int argc, char ** argv, mpd_Connection * conn ) ++{ ++ mpd_Status * status = mpd_getStatus(conn); ++ ++ if(status->state==MPD_STATUS_STATE_PLAY || ++ status->state==MPD_STATUS_STATE_PAUSE) ++ return cmd_pause(argc,argv,conn); ++ else ++ return cmd_play(argc,argv,conn); ++} ++ + enum SeekMode { RelForward, RelBackward, Absolute }; + + static int calculate_seek(int current_time, int change, int mode) { diff --git a/audio/mpc/patches/patch-ab b/audio/mpc/patches/patch-ab new file mode 100644 index 00000000000..5cdc7201685 --- /dev/null +++ b/audio/mpc/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1 2004/05/02 07:24:52 mrg Exp $ + +diff -ru src/command.h mpc-0.10.3.orig/src/command.h +--- src/command.h 2004-03-20 10:40:02.000000000 +1100 ++++ src/command.h 2004-05-02 16:42:18.000000000 +1000 +@@ -26,6 +26,7 @@ + int cmd_next ( int argc, char ** argv, mpd_Connection * conn ); + int cmd_prev ( int argc, char ** argv, mpd_Connection * conn ); + int cmd_pause ( int argc, char ** argv, mpd_Connection * conn ); ++int cmd_playpause ( int argc, char ** argv, mpd_Connection * conn ); + int cmd_stop ( int argc, char ** argv, mpd_Connection * conn ); + int cmd_seek ( int argc, char ** argv, mpd_Connection * conn ); + int cmd_clear ( int argc, char ** argv, mpd_Connection * conn ) ; diff --git a/audio/mpc/patches/patch-ac b/audio/mpc/patches/patch-ac new file mode 100644 index 00000000000..94548afe92d --- /dev/null +++ b/audio/mpc/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1 2004/05/02 07:24:52 mrg Exp $ + +diff -ru src/main.c mpc-0.10.3.orig/src/main.c +--- src/main.c 2004-03-20 10:44:14.000000000 +1100 ++++ src/main.c 2004-05-02 16:42:03.000000000 +1000 +@@ -51,6 +51,7 @@ + {"next", 0, 0, 0, cmd_next, "","Play the next song in the current playlist"}, + {"prev", 0, 0, 0, cmd_prev,"","Play the previous song in the current playlist"}, + {"pause", 0, 0, 0, cmd_pause, "", "Pauses the currently playing song"}, ++ {"playpause", 0, 0, 0, cmd_playpause, "", "Pauses if playing, play otherwise"}, + {"stop", 0, 0, 0, cmd_stop,"", "Stop the currently playing playlists"}, + {"seek", 1, 1, 0, cmd_seek,"<0-100>","Seeks to the position specified in percent"}, + {"clear", 0, 0, 0, cmd_clear,"", "Clear the current playlist"}, |