Wow, I can't believe I even remembered to save this from way back when. Anyway, here it is against 0.9. Regards, Jon Oberheide -- Jon Oberheide <jon oberheide org> GnuPG Key: 1024D/F47C17FE Fingerprint: B716 DA66 8173 6EDD 28F6 F184 5842 1C89 F47C 17FE
--- Begin Message ---
- From: Colin Walters <walters verbum org>
- To: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] [PATCH] add support for additional --print-playing-*
- Date: Mon, 17 May 2004 20:04:41 -0400
On Mon, 2004-05-17 at 03:21, Jon Oberheide wrote: > This patch for the 0.8 branch adds support for --print-playing-artist, > --print-playing-album, --print-playing-track, and > --print-playing-genre. Please consider for inclusion. This adds strings, so it can't go in 0.8, which is string frozen. I would put it in 0.9 except all the remote/activation bits are totally broken there at the moment :) Remind me once I've gotten bonobo back up to put this in.Attachment: signature.asc
Description: This is a digitally signed message part_______________________________________________ rhythmbox-devel mailing list rhythmbox-devel gnome org http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
--- End Message ---
* looking for rhythmbox-devel gnome org--2004/rhythmbox--main--0.9--patch-130 to compare with * comparing to rhythmbox-devel gnome org--2004/rhythmbox--main--0.9--patch-130 M shell/main.c * modified files --- orig/shell/main.c +++ mod/shell/main.c @@ -69,6 +69,10 @@ static gboolean dry_run = FALSE; static char *rhythmdb_file = NULL; static gboolean print_playing = FALSE; +static gboolean print_playing_artist = FALSE; +static gboolean print_playing_album = FALSE; +static gboolean print_playing_track = FALSE; +static gboolean print_playing_genre = FALSE; static gboolean print_playing_path = FALSE; static gboolean playpause = FALSE; static gboolean focus = FALSE; @@ -102,6 +106,10 @@ struct poptOption popt_options[] = { { "print-playing", 0, POPT_ARG_NONE, &print_playing, 0, N_("Print the playing song and exit"), NULL }, + { "print-playing-artist", 0, POPT_ARG_NONE, &print_playing_artist, 0, N_("Print the playing song artist and exit"), NULL }, + { "print-playing-album", 0, POPT_ARG_NONE, &print_playing_album, 0, N_("Print the playing song album and exit"), NULL }, + { "print-playing-track", 0, POPT_ARG_NONE, &print_playing_track, 0, N_("Print the playing song track and exit"), NULL }, + { "print-playing-genre", 0, POPT_ARG_NONE, &print_playing_genre, 0, N_("Print the playing song genre and exit"), NULL }, { "print-playing-path", 0, POPT_ARG_NONE, &print_playing_path, 0, N_("Print the playing song URI and exit"), NULL }, { "print-song-length", 0, POPT_ARG_NONE, &print_song_length, 0, N_("Print the playing song length in seconds and exit"), NULL }, @@ -293,6 +301,10 @@ song = NULL; if (print_playing + || print_playing_artist + || print_playing_album + || print_playing_track + || print_playing_genre || print_playing_path || print_song_length ) { rb_debug ("retrieving playing song"); @@ -302,6 +314,18 @@ if (print_playing) g_print ("%s\n", song ? song->title : ""); + + if (print_playing_artist) + g_print ("%s\n", song ? song->artist : ""); + + if (print_playing_album) + g_print ("%s\n", song ? song->album : ""); + + if (print_playing_track) + g_print ("%ld\n", song ? song->track_number : -1); + + if (print_playing_genre) + g_print ("%s\n", song ? song->genre : ""); if (print_playing_path) g_print ("%s\n", song ? song->uri : "");
Attachment:
signature.asc
Description: This is a digitally signed message part