Closed Bug 858913 Opened 11 years ago Closed 11 years ago

[Gallery] : Autoscan is not resumed, when SDcard is again mounted

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:leo+, b2g18 fixed)

RESOLVED FIXED
1.1 QE1 (5may)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed

People

(Reporter: parthasarathy03210, Assigned: dkuo, NeedInfo)

References

()

Details

(Whiteboard: [TD-8952])

Attachments

(1 file)

1. Title : Autoscanning of Contents in SDcard 
2. Precondition : have a couple of images and videos in sd card
3. Tester's Action : Insert SD Card -> open gallery apps -> unmount SD card -> mount a different sd card-> previous sdcard images are shown
4. Detailed Symptom (ENG.) : When Gallery is opened, and Whenever user mounts a different Sd card, only previous images are shown
5. Expected : Autoscanning should happen , when user unmounts and mounts a SD CARD
6.Reproducibility: Y
1)Frequency Rate : 100%
7.Comparison Results : 
1)Model Comparing : 
8. Attached files: 
1)Log : 
2)Test Contents : 
3)Video file :
Hi djf,

I have a couple of doubts with respect to mediaDb and gallery,
1. Why in Gallery Auto scanning is disabled (when creating Mediadb instance), is this done because of any performance issue.
2. Why Gallery has adopted always scan explicitly scheme.
 Eg: A scenario, which i had come across is explained in the bug description

What would be the side effect, if at all we enable the autoscanning for gallery.
Hi,

There is one more scenario in Music app.

1. Play music
2. Connect device to USB mass storage
3. Music app displays , " Unplug phone to play music"
4. When device is unplugged  from USB Mass Storage, Autoscanning should be reinvoked to update the database.

please suggest.
Flags: needinfo?(dflanagan)
blocking-b2g: --- → leo?
Triage 4/10 - Leo+ because user needs to explicitly kill gallery and launch to see new content, may cause confusions.
blocking-b2g: leo? → leo+
Hi Dominic, is this something you can check first?
Flags: needinfo?(dkuo)
Wayne,

MediaDB did handle mount/unmount of sd card, and I took a quick test, looks like gallery does not autocan after sd card re-mount, but music does, I have to do more test to find out why.

Partha,

Can you please re-describe the reproduce steps in more detail and does this issue happens on both gallery and music?

thanks.
Flags: needinfo?(dkuo) → needinfo?(parthasarathy03210)
Hi dkuo,

This issue is reproduced in both Gallery and Music.

STR:
1. have a couple of songs in SD card.
2. Enable USB storage on device
3. Play music
4. connect USB 
5. Music stops playing .
6. Pop-up , unplug cable to play music
7. When cable is unplugged, device doesn't scan for music files

Expected behaviour: Device should perform a Autoscan , because when USB is connected - user could have updated the songs .

The behaviour is same with Gallery as well.
Flags: needinfo?(parthasarathy03210)
(In reply to Partha from comment #6)
> Hi dkuo,
> 
> This issue is reproduced in both Gallery and Music.
> 
> STR:
> 1. have a couple of songs in SD card.
> 2. Enable USB storage on device
> 3. Play music
> 4. connect USB 
> 5. Music stops playing .
> 6. Pop-up , unplug cable to play music

Did you change another sd card or add/remove files on the same sd card?

I cannot reproduce this issue, setting qawanted to ask qa for help, thanks.

> 7. When cable is unplugged, device doesn't scan for music files
> 
> Expected behaviour: Device should perform a Autoscan , because when USB is
> connected - user could have updated the songs .
> 
> The behaviour is same with Gallery as well.
Keywords: qawanted
Whiteboard: [TD-8952]
At gallery.js:313, try changing scan() (which is undefined) to photodb.scan().  I think that should fix it.

Sorry! I probably broke this in a giant patch I landed when we started saving poster images for videos and I switched from two separate MediaDB objects to one.
Flags: needinfo?(dflanagan)
Hi dkuo,

Please refer comment #6, 
How is the scanning behaviour handled in music app.

add/remove files on the same sd card.
Flags: needinfo?(dkuo)
(In reply to leo.bugzilla.gaia from comment #9)
> Hi dkuo,
> 
> Please refer comment #6, 
> How is the scanning behaviour handled in music app.
> 
> add/remove files on the same sd card.

If users add/remove files on the same sd card when USB storage is enabled, after the USB cable is unplugged, MediaDB will trigger oncreated/ondeleted to update the ui, but the scannning progress on the top only shows when adding new files, deleting files will just silently removed and will not notify user.
Flags: needinfo?(dkuo)
Hi Dkuo,

STR:
1. have a couple of songs in SD card.
2. Enable USB storage on device
3. Play music
4. connect USB 
5. Music stops playing .
6. Pop-up , unplug cable to play music
7. When cable is unplugged, device doesn't resume to music player
8. It just display's "Add songs to get started : Load songs on to the memory card"

As you said,
          1. If any new music file added it should scan .
          2. delete can happen silently in background.
but,
          3. After unplugging data cable, device should resume back to music player atleast.
Flags: needinfo?(dkuo)
(In reply to leo.bugzilla.gaia from comment #11)
> Hi Dkuo,
> 
> STR:
> 1. have a couple of songs in SD card.
> 2. Enable USB storage on device
> 3. Play music
> 4. connect USB 
> 5. Music stops playing .
> 6. Pop-up , unplug cable to play music
> 7. When cable is unplugged, device doesn't resume to music player
> 8. It just display's "Add songs to get started : Load songs on to the memory
> card"

In my test I didn't get "Add songs to get started : Load songs on to the memory card".

The dialog "Music can not be used while phone is plugged in: Unplug the phone to play music" will disappear after step 8.

> 
> As you said,
>           1. If any new music file added it should scan .
>           2. delete can happen silently in background.
> but,
>           3. After unplugging data cable, device should resume back to music
> player atleast.

User might delete one of the playing songs so music will just leave the player to avoid crash. If you want to resume the player, you must re-create the playing list and put it back to the data source, the simpliest way is leave player and let the user choice themself, then user can get the new songs they just put in the sd card.
Flags: needinfo?(dkuo)
Target Milestone: --- → Leo QE1 (5may)
Is qa repro still necessary re: qawanted? 

Comment 11 looks like it may have given what you need.
(In reply to Geo Mealer [:geo] from comment #13)
> Is qa repro still necessary re: qawanted? 
> 
> Comment 11 looks like it may have given what you need.

Does qa also reproduced Comment 11?
QA Contact: mozillamarcia.knous
I am not able to reproduce the steps from Comment 11. After I unplug the cable, I see the music player and all my songs. Using V1 train build on Leo device.

However, I cannot add any files to my device to see if it rescans due to Bug 857363 and the fact that bluetooth file transfer isn't working at the moment. I can retest the scanning part when those other bugs are fixed.
Keywords: qawanted
Marcia,

Thanks for testing this, I also cannot reporduce this on music app. But our leo partner can by using their own build, so I guess it might because they have modified gonk or gecko themself. And in Comment 8 David mentioned the issue about scan() might cause another problem but result in a same way, so I will leave this one to gallery and also investigate it.

For music app there is another bug filed by leo, if anyone encountered same problem on music, please move to bug 862711, thanks.
Assignee: nobody → dkuo
Priority: -- → P2
Talked with Dominic face to face. We already knew how to fix this bug and Dominic will help this case. Dominic can resolve this issue before May 5th for sure. 

For Music, we can't reproduce this issue.
Hi, Dominic, could we have your update here? Thank you!
Flags: needinfo?(dkuo)
Confirmed with Dominic. Dominic will fix this bug before this Friday. Thanks.
Flags: needinfo?(dkuo)
(In reply to khu from comment #19)
> Confirmed with Dominic. Dominic will fix this bug before this Friday. Thanks.

Kevin, I have tested this issue again and pretty sure it was the problem that David mentioned in Comment 8, so the easy patch is attached and let's set this review to David, thanks.
Attachment #742965 - Flags: review?(dflanagan)
Reporter: can you retest the music scenario as our QA & dev cannot reproduce this? Please file a separate bug if it is reproduced and provide additional build/test details.

This particular bug will be used to track the gallery part as described in comment 8 and comment 21 only.
Flags: needinfo?(parthasarathy03210)
Attachment #742965 - Flags: review?(dflanagan) → review+
Landed on master: 54e5db64fb440bb009fc6b41f539932af9a6a5f0
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted 54e5db64fb440bb009fc6b41f539932af9a6a5f0 to:
v1-train: 5a7c965567395c80b617d9919a980a10d58662a6
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: