After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598625 - Can't use half-stars in ratings
Can't use half-stars in ratings
Status: RESOLVED WONTFIX
Product: banshee
Classification: Other
Component: general
git master
Other All
: Normal enhancement
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
gnome[unmaintained]
: 655459 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-10-15 22:50 UTC by Bogdan Butnaru
Modified: 2020-03-17 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that allows RatingRenderer to use half-star increments (9.98 KB, patch)
2011-07-28 05:24 UTC, Adam Mills
none Details | Review
Complete Half Star Ratings Patch (17.51 KB, patch)
2011-08-07 18:39 UTC, Adam Mills
none Details | Review
Banshee portion of the half-star patch. (17.74 KB, patch)
2011-11-11 23:03 UTC, Adam Mills
none Details | Review
Hyena portion of the half-star patch (10.15 KB, patch)
2011-11-11 23:04 UTC, Adam Mills
none Details | Review
Hyena portion of the half-star patch (14.20 KB, patch)
2012-08-29 02:08 UTC, Adam Mills
none Details | Review
Banshee portion of the half-star patch (25.71 KB, patch)
2012-08-29 02:08 UTC, Adam Mills
none Details | Review

Description Bogdan Butnaru 2009-10-15 22:50:38 UTC
Hello!

Several players that use the five-star metaphor for rating files allow more than six (counting no-rating) rating levels. In particular, Amarok and iTunes allow (the latter with some hacking, IIRC) the user to enter a “half-star” ratings, e.g. four-and-a-half stars for a song.

As far as I can tell, this isn't supported on Banshee. In particular, while importing my Amarok collection all my half-star ratings are gone.

(I haven't looked closely enough to see if they're ignored or converted to an adjacent whole-star rating.)

This is a deal-breaker for me, as I have several thousand ratings, about half of which have half-stars.

It should be easy enough to add, and it shouldn't add any unwanted complexity for users. (A simple “allow half-star ratings” setting would be enough. It doesn't even need to be in the interface, users who need this can access it via GConf.)

IIRC, Amarok internally has 0–10 ratings, while iTunes has 0–100. In Amarok the half-star is represented as a smaller star; iTunes (at least some versions) uses the ½ character for a half-star. Either would be acceptable.

In Amarok, clicking on a star toggles between its full and half state, except for the first star, which cycles between 0, 0.5 and 1 star ratings. Personally I like that. I don't remember how iTunes does it, but I think it's the same.

I'm willing to implement this myself, if some dev is willing to do a bit of mentoring. (Mostly I want to know that the developers like the idea, and that I won't work to make a patch that's ignored.)
Comment 1 Alexander Kojevnikov 2009-10-15 23:27:32 UTC
I'm personally missing this feature as well. If Aaron and Gabriel don't have principal objections against it, I'm willing to mentor the development.

At a quick glance, this needs to be changed:

 * RatingEntry/RatingRenderer/ColumnCellRating. I think using half stars is the easiest.
 * Data migration. Current values 0->5 could be translated to 0->10 as rating'=rating*2
 * RandomByRating.
 * Default smart play lists + their migration.
 * Misc references to ratings, e.g. in MtpTrackInfo, IpodTrackInfo, etc.
Comment 2 Hafiz Shafruddin 2010-12-03 12:09:22 UTC
This will attract more amarok users to banshee.
Comment 3 Gavin Baker 2011-01-31 04:07:26 UTC
I agree. I miss this feature from Amarok.
Comment 4 Philip Gillißen 2011-04-18 13:27:26 UTC
This feature came up in the mailing list once again.

http://banshee-media-player.2283330.n4.nabble.com/Feature-1-2-Star-Ratings-td3456244.html
Comment 5 Alexander Kojevnikov 2011-07-28 01:17:51 UTC
*** Bug 655459 has been marked as a duplicate of this bug. ***
Comment 6 Adam Mills 2011-07-28 05:24:52 UTC
Created attachment 192794 [details] [review]
Patch that allows RatingRenderer to use half-star increments

This patch allows half-star ratings to be used in RatingRenderer.cs
Comment 7 Adam Mills 2011-07-28 05:30:02 UTC
I attached a patch I created that allows ratings to be set from 0-10 instead of 0-5 using half-star increments.

This however doesn't include any data migration, therefore existing ratings won't be correct. (They will be mapped to 0-2.5 stars)

If there is already already code that can handle data-migration that would be fantastic. Otherwise it will be somewhat more of a chore.
Comment 8 Adam Mills 2011-08-07 18:39:34 UTC
Created attachment 193386 [details] [review]
Complete Half Star Ratings Patch

Includes data migration
Comment 9 Adam Mills 2011-08-07 18:41:22 UTC
I created a new patch for the data migration and the other miscellaneous changes that needed to occur to allow for half-star ratings. In combination with my previous patch for src/Hyena, I believe this is all that needs to be done for the half-star ratings change.

If a developer could review my patch and make sure I haven't overlooked anything I would be grateful.
Comment 10 Adam Mills 2011-11-11 23:03:34 UTC
Created attachment 201262 [details] [review]
Banshee portion of the half-star patch.

Updated the patch against Banshee 2.3.1 using the master branch as of 11 November 2011.
Comment 11 Adam Mills 2011-11-11 23:04:29 UTC
Created attachment 201263 [details] [review]
Hyena portion of the half-star patch
Comment 12 PhoneixSegovia 2012-08-20 15:47:23 UTC
Have been added the patch? What is the actual situation?
Comment 13 Adam Mills 2012-08-20 23:49:12 UTC
The patch currently works, however it is not ready to be included yet.

Because this patch requires changes to Hyena, it needs to be refactored to create an acceptable patch to Hyena. I've done part of the work, and will try to submit a patch there soon. Once that is accepted, work can continue in Banshee.
Comment 14 PhoneixSegovia 2012-08-21 06:51:46 UTC
Thanks for the update.

We will wait for your patch and thanks for your work.
Comment 15 Adam Mills 2012-08-29 02:08:00 UTC
Created attachment 222696 [details] [review]
Hyena portion of the half-star patch
Comment 16 Adam Mills 2012-08-29 02:08:35 UTC
Created attachment 222697 [details] [review]
Banshee portion of the half-star patch
Comment 17 Adam Mills 2012-08-29 02:20:12 UTC
OK, I've uploaded new versions of the patches for Hyena and Banshee.

I updated my approach for the changes in Hyena. Instead of having the ratings go from 0-10 for half-stars, I updated the RatingRenderer::Value to a double data type instead of an integer. This requires changes to external methods that strictly are expecting an integer, but it only requires a cast to/from a double. This method also has the advantage of making much more sense when reading the code.

By default, I have fractional stars disabled in RatingRenderer. This means that other than a change from an int to a double, downstream projects should notice no change in functionality unless they enable the optional constructor parameter.

In Banshee I've taken the following approach, which will require some feedback from project developers: In the database, I am storing the ratings as an integer from 0-10; however, I updated TrackInfo::Rating to supply a double. This means that there is a translation whenever storing to / reading from the database.

Again, by default this patch has no user-visible changes since banshee does not enable the fractional stars setting in RatingRenderer. This will allow us to test any regressions from the database migration or Hyena changes.

Once both these patches are accepted, a decision needs to be made on how to enable half-star ratings. I believe that a configuration option should be added, that is by default disabled.
Comment 18 André Klapper 2020-03-17 08:25:20 UTC
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the
responsibility for active development again.
See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.