View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009352 | MMA | Synchronization | public | 2012-05-15 13:14 | 2012-10-20 00:46 |
Reporter | jiri | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Summary | 0009352: USB DB Synchronization | ||||
Description | As discussed over e-mail and Skype, we need modify the Android USB DB synchronization as follows: Steps done by MM for Windows: 1. Download mmstore.db from the phone. In case mmstoresynced.db exists, it's downloaded instead (see below). 2. Add triggers to log all the activity of sync operations and a table to store info about these operations: Table: SyncOperations Fields: ID IDItem - ID of item modified OperationType - integer specifying whether a track was Added, Deleted or Modified. Other logged operations would also include Playlists modifications IDField - ID of field modified (or inserted), e.g. 1=Title, 2=Album, etc. NewValue - New value of the field Timestamp - time in UTC (can be used later to resolved conflicts) 3. Do all the sync operations 4. Upload the updated DB as mmstoresynced.db. Steps done by MM for Android: 1. Monitor existence of mmstoresynced.db on startup of application and during application run. 2. When mmstoresynced.db is created, application will reflect all its operations to the mmstore.db and delete mmstoresynced.db. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
Added in build 4.1.0.1601 The OperationType values are: MEDIA_ADDED = 1; MEDIA_UPDATED = 2; MEDIA_DELETED = 3; PLAYLIST_ADDED = 4; PLAYLIST_UPDATED = 5; PLAYLIST_DELETED = 6; Filename of the synced/modified DB is 'mmstore.db.synced' |
|
Part of this issue would be to optimize DB access in general - including during the initial scan. |
|
Per Skype conf.call, the exact workflow of USB sync (particularly re. sync over MTP) was decided to be: 1. On device connection over USB, MM for Win (MMW) tries to read mmstore.db from the phone, in order to know device content. 2. In case the DB doesn't exist, our MM for Android (MMA) probably isn't installed and so the device scan proceeds as for any other device. 3. In case the DB isn't readable, it's probably locked by MMA and so MMW writes a file to database folder, which notifies MMA to close the DB, copy it to another file and continue normal operations. This alternative DB should be perfectly readable for MMW, since no DB connection will exist. 4. During sync and track upload to device, MMW will continually update its local copy of the device DB. It will periodically (every 30 sec or so) upload the updated DB to the device, so that MMA can update its internal DB during the sync. MMW will make this upload to a specific filename, but in case the upload fails (probably because the file is locked by MMA), MMW will upload it to an alternative filename, so that MMA can use this second file when it finishes with the first one. |
|
Implemented |
|
Verified 47 and MMW 1602 |