Closed Bug 1211994 Opened 9 years ago Closed 7 years ago

[NGA] artist view has artist in wrong section

Categories

(Firefox OS Graveyard :: Gaia::Music, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hub, Assigned: hub)

Details

Attachments

(4 files)

Attached image Screenshot
Artist view has artist in wrong section It starts with 1, but then there are two, that are in the previous section. See screenshot.
Attached image Screenshot 2
This is the album tab. I think one of the album that might cause the issue is "...And Justice For All". Cue the '.' section on that screenshot.
Here it start with TWO misplaced.
happens also in the "songs" list.
I found it: I have these two artists, case sensitive 'a-Ha' and 'dada' Offset increase after 'A' and after 'D' these two are at the end of the list after 'Zebda' Sorting is case insensitive, group calculation as well. But not the actual grouping.
This is what's happening Wilson.
Assignee: nobody → hub
getSectionName() seems to do its job: I/Music ( 7519): Content JS LOG: getSectionName for a-Ha A I/Music ( 7519): at ArtistsView/</<.getSectionName (app://music.gaiamobile.org/views/artists/view.js:40:9) I/Music ( 7519): Content JS LOG: getSectionName for dada D I/Music ( 7519): at ArtistsView/</<.getSectionName (app://music.gaiamobile.org/views/artists/view.js:40:9) And the DOM show the proper data-section attribute too for these.
In ArtistsView.prototype.render() The last FOUR artists are in index order: Zebda a-Ha dada Étienne de Crécy Their respective sectionName are 'z', 'a', 'd', 'é'. So the question is as follow: Why is it sorted that way from getArtists() and is that gaia-fast-list doesn't care about the sectionName ?
Flags: needinfo?(jdarcangelo)
(In reply to Hubert Figuiere [:hub] from comment #7) > In ArtistsView.prototype.render() > > The last FOUR artists are in index order: > > Zebda > a-Ha > dada > Étienne de Crécy > > Their respective sectionName are 'z', 'a', 'd', 'é'. > > So the question is as follow: Why is it sorted that way from getArtists() > and is that gaia-fast-list doesn't care about the sectionName ? Ahhh.. Looks like :squib missed a spot with his sort patch: https://github.com/mozilla-b2g/gaia/blob/master/apps/music/js/endpoint.js#L342 There's a new `artists()` method on `Database` that's not being used: https://github.com/mozilla-b2g/gaia/blob/master/apps/music/js/db.js#L417 If you look at the other queries, they're using specialized calls on `Database` now. Like `Database.albums()` and `Database.songs()`. As for the section issue with gaia-fast-list, I'm guessing its not working because those aren't being grouped with the rest of the z's, a's, d's and e's since the sort is wrong.
Flags: needinfo?(jdarcangelo)
<GFL> does does require sorting to be correct. IIRC it is not smart enough to re-sort the data into the correct order so that they appear to land in the correct sections.
Justin, looks like this is it. Now in my artist view it creates a '.' section because I have an album "...And Justice For All". But this is the getSectionName logic that is failing here. I'll see about a solution.
Comment on attachment 8671923 [details] [review] [gaia] hfiguiere:bug1211994-section-fixes > mozilla-b2g:master This fixes artists. There is a totally different fix for the album problem I do have.
Attachment #8671923 - Flags: review?(jdarcangelo)
Blocks: 1204568
Comment on attachment 8671923 [details] [review] [gaia] hfiguiere:bug1211994-section-fixes > mozilla-b2g:master Cancelling review. I actually need to fix the other problem. There is a É section created. (also in Albums as I have a title that is "Équinoxe")
Attachment #8671923 - Flags: review?(jdarcangelo)
Comment on attachment 8671923 [details] [review] [gaia] hfiguiere:bug1211994-section-fixes > mozilla-b2g:master Let's fix this first part. We know it was wrong.
Attachment #8671923 - Flags: review?(jdarcangelo)
Attachment #8671923 - Flags: review?(jdarcangelo) → review+
Part 1 merged https://github.com/mozilla-b2g/gaia/commit/e8011a04e79de369784b9db191fe0c01450924bc Orange are 1. unrelated. 2. intermittent and not caused by this.
No longer blocks: 1204568
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: