phil65 / skin.estuary

Public repository for the Kodi default skin "Estuary"
Other
25 stars 82 forks source link

Add Music Graphical Star User Ratings to WideList view #245

Closed zag2me closed 6 years ago

zag2me commented 6 years ago

Simple addition to add the Wide List view to show the User Rating as stars when browsing an album.

While its nice to have the option to enable/disable the user rating or overall rating for all media types, music is slightly different, as it is preferable to show all the ratings on one screen (so you can see the best songs in the track list). The ratings only show if the user has actually rated tracks so most users will not see a difference until they use this feature.

It should also compliment the current rating stars on the album artwork as they show the numerical value which is useful in addition to stars.

Hopefully I got the alignment values correct... Tested on my 1080p windows dev machine, and Nvidia shield @ 4k

screenshot000

iTunes uses the same kind of feature in its music list views, so its a common feature in other apps:

itunes-half-rating

Code originally came from Aeon Nox 5, so thanks @BigNoid

zag2me commented 6 years ago

ping @phil65 just in case you missed it...

Or should I PR to kodi mainline?

phil65 commented 6 years ago

I guess this wont work correctly with very long song titles?

zag2me commented 6 years ago

Depends how long I guess, I've got 30,000 tracks and not seen any issues so far.

Will do some more testing.

zag2me commented 6 years ago

Thanks for feedback @phil65 , I did some tests and found a few tracks long enough to show the problem:

Example kodi_20171126_162556

Interestingly this is how the official iPhone Kodi remote handles it. Personally I don't like the different size of font look: 20171126_162530000_ios

And TheAudioDB just cuts off anything over 45chars on lists views: tadb_track_length

And some metrics to show variance in track lengths by analyzing all 2 million of them on TADB. track_length_metrics

It appears 64 char is the magic number in Kodi where it overlaps.

Any pointers on how to fix? Is there a substr function in kodi skinning? I'm really a skinning noob sorry, just trying to push the features forward in Kodi for music ;)

phil65 commented 6 years ago

I am not very confident that the proposed solution works for all use cases. It probably also doesnt work with different label2's? Might not be trivial to fix, would have to take a look myself.

zag2me commented 6 years ago

Thanks Phil, if you could look some time that would be great but no rush.

Maybe @BigNoid has an idea as this originally came from Aeon Nox code?

It really is a big feature for anyone who rates song tracks using the music library so I would love to see it get in. It really finishes off the track wide list view to look awesome :)

BigNoid commented 6 years ago

I like the stars, looks good. About the text problem, if you swap the stars and duration the text will cut off automatically when it's too long for unfocused and scroll in the focused entry when you make both label1 and label2 even width. Than you don't have to worry about the contents of label2 anymore as well. Probably doesn't look as good as now though.

zag2me commented 6 years ago

Thanks for the input, but yeh that would leave a big gap when stars are not used, I think it would look good with the stars on the other side.

This PR works for me so I will maintain it in my own mod until another solution is found.

Cheers,

Zag.