Closed Bug 820173 Opened 13 years ago Closed 13 years ago

Videos deleted through usb mass storage remain in Video app until relaunch

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:-, b2g18+)

RESOLVED WORKSFORME
B2G C3 (12dec-1jan)
blocking-basecamp -
Tracking Status
b2g18 + ---

People

(Reporter: diego, Unassigned)

Details

If I delete all videos through USB mass storage while the video app is loaded, they will remain listed by the video app until I close it with the task manager
blocking-basecamp: --- → ?
Assignee: nobody → dflanagan
blocking-basecamp: ? → +
Priority: -- → P2
Diego: thank you for the careful testing... This is the kind of corner case that we really need to exercise in all of our apps. What I'm seeing here is that when I do a USB mass storage session from MacOS, videos get "deleted" by being moved to /sdcard/.Trashes/501/. So then when the session ends, the video app notices that the video was deleted and a new video added. (The deleted video moves to the bottom, which means that the app isn't properly sorting videos when they're added, I suspect.) Gallery had this issue and I added code to just filter out directories that begin with '.'. I'll do the same for the Video app. But will also ask Dave Hylands and Doug Turner to see if either of them want to address this at a lower level. Cc'ing Dominic because he may need to make the same change to the Music app.
Okay, per discussion with dhylands and dougt on IRC, Mac, Windows, and Linux graphical file managers don't actually delete files, they move them to trash directories, even over UMS. I'm reassigning this to Doug, so he can make DeviceStorage filter out trash directories. As a fallback, we can fix this directly in the app or in mediadb.js, but doing it in device storage would be the right thing, and Doug has agreed to do that.
Assignee: dflanagan → doug.turner
Marcia: (Or Diego, since you were the reporter) In order for Doug to fix this, we need to know what trash directories get created when the phone is hooked up to different operating systems. On Mac, files get moved to /sdcard/.Trashes. I think Doug can test on Linux and figure out what happens there. But neither of us has a Windows machine. Could you try hooking a phone up to a Windows box, starting a USB mass storage session, and then delete a file or ('move to trash') and see what directory gets created on the sdcard? It will probably be a hidden directory so you might have to do a adb shell ls -l /sdcard or something to see it.
Keywords: qawanted
I can't see any trash folder (hidden or otherwise) being created (or updated) after deleting files from windows. I tried moving to trash and just a plain delete. Both just warn that the file will be "permanently deleted". There were some existing trash folders already there but I think they were from mounting on Linux
Diego, That's weird. Its like we're seeing different bugs. If you delete the video that is displayed at the top of the list, do you see it reappear at the bottom of the list, or does it not disappear at all? When you do this, does the Video app display its "unplug to view videos" overlay, indicating that it knows that the sdcard has been unmounted? If it does that then it should scan when the USB mass storage session ends. Can you still reproduce this? If so, could you give us precise steps to reproduce? Is there really no trash directory even if you adb shell ls -l /sdcard?
Target Milestone: --- → B2G C3 (12dec-1jan)
If you empty the trash before ejecting the SDCard from the computer, does this problem still happen?
Flags: needinfo?(dwilson)
(In reply to David Flanagan [:djf] from comment #5) > When you do this, does the Video app display its "unplug to view videos" > overlay, indicating that it knows that the sdcard has been unmounted? Yes > Is there really no trash directory even if you adb shell ls -l /sdcard? There is no trash folder in Windows, but then again, it works OK with windows. Deleted videos do dissapear
Flags: needinfo?(dwilson)
(In reply to Doug Turner (:dougt) from comment #6) > If you empty the trash before ejecting the SDCard from the computer, does > this problem still happen? Yep, this fixes it. I'm guessing you guys are planning on excluding trash folders from media library scans?
This has very little user impact, and when the videos don't play, the user won't be surprised (they just deleted the videos). If any of our partners disagree and think this should block our v1.0 release, please re-nominate.
blocking-basecamp: + → -
tracking-b2g18: --- → +
Assignee: doug.turner → nobody
Removing qawanted since it doesn't seem like there is anything to do at this point.
Keywords: qawanted
I've worked around this bug in https://github.com/mozilla-b2g/gaia/pull/7271 which is a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=824099 If that fix lands, it should resolve this particular bug and similar ones for all of the Gaia media apps that use mediadb.js I'm not sure if we should close this bug or keep it open so we can fix the issue at the gecko level, though.
This works! Nitpick: if you remove all videos while the video app is open, the app only shows a gray gradient. It shows the "no video available" when you restart it, though
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Diego, > Nitpick: if you remove all videos while the video app is open, the app only shows a gray gradient. It shows the "no video available" when you restart it, though Would you mind following a new bug for this?
You need to log in before you can comment on or make changes to this bug.