View Issue Details

IDProjectCategoryView StatusLast Update
0012237MMADBpublic2024-07-31 00:17
Reporterpeke Assigned To 
PriorityurgentSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version1.0.7 
Target Version2.0.1Fixed in Version2.0.1 
Summary0012237: OTG Storage: Handling USB HDD Library
DescriptionMany devices now includes needed code to use OTG and Android "L" will make things even more easier for developer due the fact that they are finally solving number of storage access issues.

As proposed in the past saving Library file on External Storage would allow both MMA and MMW access its content much faster than scanning it each time HDD is connected.
Additional InformationTicket # 5633
Ticket 5913
https://www.mediamonkey.com/forum/viewtopic.php?t=102232
Tagstodoc-help
Attached Files
device-2015-08-20-210623.png (199,918 bytes)   
device-2015-08-20-210623.png (199,918 bytes)   
Fixed in build1201

Relationships

related to 0012335 closedmarek MMA Video not playable from /Folder/Files (was: OTG drives not accessible in 1.1) 
related to 0011794 newmartin MMA Scanning engine / tag parser / tagging engine 
related to 0013087 closedmartin MMA USB OTG support (via third-part app) 
related to 0014931 closedLudek MMW v4 "Media transfer process appears to be frozen" message while scanning large USB drive 
related to 0012402 feedbackrusty MMA Samba (CIFS/SMB) / AFP (Apple Filing Protocol) / NFS (Network File system) / Cloud Services support 
related to 0014462 assignedrusty MMA USB Drive: MMA do not recognize USB drive 
related to 0020030 newmartin MMA Playlists are not Listed in Folder browser 
related to 0016901 closedLudek MMW 5 Sync: Add <Track ID> mask in order to avoid duplicates on sync 

Activities

marek

2015-07-16 10:09

developer   ~0042708

a) it will be fixed with our own storage scanner (0011794)
b) it works now but there are some issues when tracks are sometimes deleted from DB when storage is unmounted. I think that it is caused by specific path in stickmount where OTG storage is virtually subfolder of SD card.

I can test it on my Nexus Player where I use Stickmount with HDD.
c) we can implement it now but we will still need the storage scanner!

So I will fix b) and I think that a) and c) should be postponed till 0011794 is fixed

marek

2015-07-20 18:12

developer   ~0042714

b) I am not able to test MMA on Nexus Player due to incompatibility with keyboard devices as Nexus Player (0012790)

I can connect external mouse but my USB hub is damaged and I have to buy a new one to be able connect both mouse and external HDD. I will test it probably tomorrow.

marek

2015-08-03 20:49

developer   ~0042799

b) Processing of USB storages is quite specific. They are all added to common folder:
 .../usbStorage/

and it has subfolder for each previously connected (and also already disconnected) USB device.

The main issue is that USB storages are subfolders of main external storage so they are not recognized as separate folders. When user unmounts the storage, it looks like the folder is deleted (not that storage is unmounted). So all tracks are deleted from DB.

I will implement special recognition conditions for USB storages so it will be processed correctly.

marek

2015-08-10 13:21

developer   ~0042812

b) Fixed in build 465

Refactored storage scanning to be more compatible with current APIs and to be able to parse storages mounted by Stickmount.

Refactored storage processing and DB queries to support storages that are hierarchically sub-folders of other storages.
E.g.:
/storage/sdcard0
/storage/sdcard0/usbStorage/sda1

Added tests for DB queries and parsers.

rusty

2015-08-11 15:54

administrator   ~0042818

I think that this can be considered mostly resolved for now, in that USB drives that appear as external cards (i.e. case b) as on many Samsung devices) are scanned into the library (still to be verified and tested re. how this functions when the device is disconnected).

However, with respect to case a) although isn't yet able to add content to the library from locations that aren't treated as SD cards due to limitations in the Android Media Scanner, would it make sense in the meantime (before we implement an MMA scanning engine) to:
i) allow MMA to play such content via apps such as ES Explorer that can browse such content? e.g. on the Nexus 5/Lollipop (which doesn't treat mounted USB drives as SD Cards, ESExplorer can browse the USB drive and play a Video, however, MMA doesn't appear as a supported device for playing that video)
ii) allw MMA to play such content by browsing to it via Folders/Files/USB drive...

marek

2015-08-20 19:03

developer   ~0042835

Last edited: 2015-08-20 19:06

I have tested it on Samsung galaxy S4 (Lollipop) and it works fine. Samsung drivers mounts USB flash disk as /storage/UsbDriveA.

This storage is visible in MMA in folders view (see attached screenshot) and tracks are playable. These tracks are also playable from ES file explorer.

rusty

2015-09-04 17:04

administrator   ~0042902

To clarify: my experience is consistent with yours, that devices that 'see' external storage can represent the storage correctly in MM5.

The reason I'd left the bug open is because on devices such as the Nexus 5 running lollipop--which don't expose external storage as a drive, I was wondering whether we should:
i) allow MMA to play content from external storage via apps such as ES Explorer that can browse such content? e.g. ESExplorer can browse the USB drive and play a Video, however, MMA doesn't appear as a supported device for playing that video)
ii) allow MMA to play such content by browsing to it via Folders/Files/USB drive.

rusty

2015-09-30 13:20

administrator   ~0043011

Pushed.

rusty

2016-01-13 19:23

administrator   ~0043856

New report of crashes when attempting to use USB storage:
ADX-390-16920

marek

2016-04-06 08:42

developer   ~0044391

We can use SAF api to access USB storages. It will be much simpler. Total Commander use it too.

We have some possibilities how to detect that USB was connected and then we can show the Storage permission activity. To access the USB (even reading), user has to select the USB in the system dialog. The media won't be in MediaStore so we won't be able to add them to library (till our scanner is implemented). It will be accessible via Folders view for now.

But I think that it is a good solution. It is Android supported approach. It is available since Lollipop and it is much simpler than using libaums library. The library has some disadvantages too. When MMA mounts the USB via library, other apps won't be able to see the storage (used in ES file explorer).

rusty

2017-03-07 14:41

administrator   ~0047421

re. case b) even though it's fixed, users have indicated that the current approach is problematic in cars, since MMA appears to 'endlessly' do a mediastore sync each time the car is started (for an Android headunit running MMA).
http://www.mediamonkey.com/forum/viewtopic.php?f=21&t=86490

peke

2020-07-23 20:49

developer   ~0059095

Using approach from #14521 should also resolve this issue?

peke

2023-04-03 06:04

developer   ~0071427

User at Ticket # 5633 suffers from same behavior

martin

2024-07-19 14:03

developer   ~0076350

Fixed in build 2.0.1.1201

peke

2024-07-27 11:14

developer   ~0076455

Verified 1201 / 3040