Closed Bug 943797 Opened 11 years ago Closed 11 years ago

[music] The default album art will not change in the player view

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: dkuo, Assigned: dkuo)

References

Details

(Keywords: regression, Whiteboard: [Fugu] [v1.2f-uplift-needed])

Attachments

(2 files)

Reproduce steps:
0. Have some audio files without embedded cover images in the sd card.
1. Launch music app and select the all-songs view.
2. Play one song and enter the player view.
3. Press next button to go to the next song.
4. Press previous button to back to the previous song, the default album art did not change.
=================
Flash Information
=================
Your Target Build: PVT.v120.inari
URL:  https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2gotoro/nightly/mozilla-b2g26_v1_2-inari-eng/latest/
ENG Ver: true
Flash: Full Image.
Gaia:     264c6044b941437ac3c4b28fe4ca392d2bc78445
Gecko:    http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/21e2ad082d85
BuildID   20131126004001
Version   26.0
Unable to repro on the Buri 1.2 Build ID: 20131127004001

Gaia   92cd11ea023dd6598d82d859ae3c945ff6589ce6
SourceStamp 14e91ab12441
BuildID 20131127004001
Version 26.0
Base: v1.2_20131115
Attached file Video of this bug
Jim,

I did not wait for this bug to become koi+ and just worked on it because, this is a regression and also broke the album arts on lock screen and utility tray(album arts will not sync with the music player).

The root cause is the previous class that with "default-album-" prefix on the cover div was not removed, so the user will always see the last default album art(with a larger index) that applied on the cover div. Since this is about the background index, it also reminds me about bug 831641 which confuses the users, so I have changed the logic on how we decide the default album art and fixed that issue conveniently.

That is, using a simple hash function to generate an unique number base on the album name and artist name in the metadata, then mod 10 to get one of the default album arts, by this every track will have the same default album art(if there is no embedded cover image) when it displays in every different view.

Also, I used an offscreen image to load the embedded image or the default image, when it's loaded, fade in and display the album art on the cover div, we will not see both the embedded image and default album art at the same time again.

This patch also modified the sublist view so potentially it should also fix bug 943257 about the default album art, would you please review this? thanks.
Attachment #8340996 - Flags: review?(squibblyflabbetydoo)
Blocks: 895292
Comment on attachment 8340996 [details] [review]
Use hash to decide the default album art

Ok, I tested this out and all seems to work well. r=me once you make the changes I requested on Github.
Attachment #8340996 - Flags: review?(squibblyflabbetydoo) → review+
Thanks Jim, I have addressed those issues you mentioned on github before I landed it, and travis was also green so I have merged the patch.

Landed on master: e01827ec7b9bc0426e0f5d216123b9247413db4e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
blocking-b2g: koi? → koi+
Blocks: 943257
v1.2: 0659f16b9790b1cf9eba4d80743fcc774d2ffe3a
Blocks: 831641
Whiteboard: [Fugu] [v1.2f-uplift-needed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: