Bug 583108 - Song rating throught rhythmbox-client
Song rating throught rhythmbox-client
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-05-18 17:43 UTC by stefano frangioni
Modified: 2009-06-16 11:31 UTC (History)
0 users

See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that applies to rhythmbox/remote/dbus/rb-client.c (2.41 KB, patch)
2009-05-18 17:45 UTC, stefano frangioni
reviewed Details | Diff | Review
Patch that applies to rhythmbox/remote/dbus/rb-client.c (2.44 KB, patch)
2009-06-16 08:15 UTC, stefano frangioni
committed Details | Diff | Review

Description stefano frangioni 2009-05-18 17:43:09 UTC
I made a patch to allow song-rating throught rhythmbox-client.

usage:
rhythmbox-client --rate-song X

where X is a number between 0 and 5.
Comment 1 stefano frangioni 2009-05-18 17:45:32 UTC
Created attachment 134885 [details] [review]
Patch that applies to rhythmbox/remote/dbus/rb-client.c

Changelog:
added song rating capabilities throught rhythmbox-client
Comment 2 Jonathan Matthew 2009-06-16 05:05:27 UTC
+	{ "set-rating", 0, 0, G_OPTION_ARG_DOUBLE, &set_rating, N_("Rates current song"), NULL },

I think I'd prefer "Set the rating of the current song"

+	value=g_new0(GValue, 1);
+	g_value_init(value, G_TYPE_DOUBLE);
+	g_value_set_double(value, song_rating);

Spacing is incorrect here - we generally use spaces around operators and between function names and their arguments.

+	if (set_rating>=0.0 && set_rating<=5.0) {

and here.


Other than these minor things, this looks OK to me.  Generally we prefer to credit contributors by full name rather than pseudeonyms.  Do you wish to be credited as 'ste' or is there a full name you'd prefer?
Comment 3 stefano frangioni 2009-06-16 08:15:53 UTC
Created attachment 136698 [details] [review]
Patch that applies to rhythmbox/remote/dbus/rb-client.c

modified as suggested
Comment 4 stefano frangioni 2009-06-16 08:22:54 UTC
I also changed my name in my account preferences :)
Comment 5 Jonathan Matthew 2009-06-16 11:31:53 UTC
I cleaned up a few more things and committed it.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.