GNOME Bugzilla – Bug 598625
Can't use half-stars in ratings
Last modified: 2020-03-17 08:25:20 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.)
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.
This will attract more amarok users to banshee.
I agree. I miss this feature from Amarok.
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
*** Bug 655459 has been marked as a duplicate of this bug. ***
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
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.
Created attachment 193386 [details] [review] Complete Half Star Ratings Patch Includes data migration
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.
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.
Created attachment 201263 [details] [review] Hyena portion of the half-star patch
Have been added the patch? What is the actual situation?
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.
Thanks for the update. We will wait for your patch and thanks for your work.
Created attachment 222696 [details] [review] Hyena portion of the half-star patch
Created attachment 222697 [details] [review] Banshee portion of the half-star patch
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.
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.