Closed Bug 796305 Opened 12 years ago Closed 10 years ago

Music app should order songs by track number

Categories

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

defect
Not set
normal

Tracking

(b2g-v2.2 fixed, relnote-b2g ?)

RESOLVED FIXED
2.1 S7 (24Oct)
Tracking Status
b2g-v2.2 --- fixed
relnote-b2g --- ?

People

(Reporter: ghtobz, Assigned: hub)

References

Details

(Whiteboard: [label:music])

Attachments

(1 obsolete file)

[GitHub issue by cgjones on 2012-09-07T21:11:01Z, https://github.com/mozilla-b2g/gaia/issues/4467]
@davidflanagan's new metadata parser returns track number.  The music app currently seems to randomly order songs within albums.  It should instead use the track number if available.  If not available, it should sort in a stable order, such as by song title.
QA Contact: dkuo
Assignee: nobody → dkuo
QA Contact: dkuo
Component: Gaia → Gaia::Music
I would also propose that we only display these track numbers when viewing all tracks on a single album. In other lists, the numbers don't really have any relevance. Plus, if we show the metadata and have track numbers showing up in playlists, the order won't make any sense. 

Should this be tracked separately?
Blocks: 841977
Assignee: dkuo → nobody
Assignee: nobody → hub
Depends on: 841949
Target Milestone: --- → 2.1 S5 (26sep)
I do a sort after the enumerateAll. Not sure if that's the best way.

Currently tested in Ogg files.
Attachment #8487519 - Flags: feedback?(squibblyflabbetydoo)
Tested with a two disc album. Order is correct.
Comment on attachment 8487519 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23918

Jacqueline: see below for my proposal for how to format track numbers. Is this good, or do you have a better idea?

This seems alright (see my comment on GitHub for some ideas to simplify the code), although I think we need to change the numbers in the album view as well, since we just count up from 1 instead of showing the actual track number[1]. Obviously, this is most important for multi-disc albums, but it's also important for when you don't have all the songs from 1 to N (maybe you just like some of them, or there are blank tracks near the end to hide a "hidden" track[2]).

For formatting the track number, I'd recommend something like "[{d}.]{tt}". That is, a one-digit disc number (if any) followed by a dot, and then a two-digit track number. For instance:

  01   - track number is 1, disc number is null
  1.01 - track number is 1, disc number is 1

It might be worth having UX look at this proposal.

[1] https://github.com/hfiguiere/gaia/blob/8a991d30325d1f5b34bfa5627fdd5a10d754176f/apps/music/js/music.js#L1181-L1183
[2] For instance, Danzig - IV: http://en.wikipedia.org/wiki/Danzig_4#Track_listing
Attachment #8487519 - Flags: feedback?(squibblyflabbetydoo)
Flags: needinfo?(jsavory)
Another thing I could see that could be more complicated (in a phase 2) would be to have a list like that for multi disc:

Album
Disc 1
1 . song 1
3.  song 3
Disc 2
4. song 4 (disc 2)

But I agree using the track number. One very common player that does that is iTunes. It doesn't display a number if the track number isn't in the metadata.
Yeah, that could work too. I tend to prefer the "1.01" format, since many multi-disc albums are only that way because they exceeded the maximum length of the CD (or whatever format they're in), so the tracks make more sense to me listed together, rather than in separate subsections. But I agree that we don't need to worry too much about this yet; we can revisit it when we're working on redoing the UI for music.
(In reply to Jim Porter (:squib) from comment #4)

> For formatting the track number, I'd recommend something like "[{d}.]{tt}".
> That is, a one-digit disc number (if any) followed by a dot, and then a
> two-digit track number. For instance:
> 
>   01   - track number is 1, disc number is null
>   1.01 - track number is 1, disc number is 1


I have implemented this in https://github.com/hfiguiere/gaia/tree/disc-numbers-list

If that's relevant I can put it in the Pull-Request for this bug.
Status: NEW → ASSIGNED
> I have implemented this in
> https://github.com/hfiguiere/gaia/tree/disc-numbers-list
> 
> If that's relevant I can put it in the Pull-Request for this bug.

This is actually part of bug 841977
Hey Jim, I think that the track number display that you have proposed should work well. I am not too familiar myself with how these tracks are typically displayed but this makes sense to me. 

I will explore the option that Hubert has suggested and include it in the music refresh if it seems to be more clear. 

The only thing I want to ask (and it may be a silly question) is if the disc number is null (as in there is only one disc) would the track numbers be 01 02 03 etc. or 1, 2, 3 etc.?
Flags: needinfo?(jsavory) → needinfo?(squibblyflabbetydoo)
With the current patch, for bug 841977, they would be 1, 2, 3, 4, 5, etc. If you think it should be otherwise, please let me know.
Flags: needinfo?(squibblyflabbetydoo)
Target Milestone: 2.1 S5 (26sep) → 2.1 S6 (10oct)
Hub,

Lets get a closure on it this week. Please work with Jim/David to get dependency landed and your patch reviewed. 

Moving to next sprint since it didn't make it in sprint 5.

Thanks
Hema
Flags: in-testsuite+
Release Note Request (optional, but appreciated)
[Why is this notable]: UI feature changed.
[Suggested wording]: Sort the tracks by track number to match that artist ordering.
[Links (documentation, blog post, etc)]:
relnote-b2g: --- → ?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: