View Issue Details

IDProjectCategoryView StatusLast Update
0011630MMAGeneralpublic2015-03-16 16:18
Reporterrusty Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.4 
Target Version1.1.0Fixed in Version1.1.0 
Summary0011630: Android Media Store isn't immediately updated when tracks are deleted in MMA (USB Sync: content fails to sync to a Nexus 5)
Description0 Delete all tracks and playlists from within MMA
1 Delete /MediaMonkey directory from Nexus 5
2 Delete all MMA app settings
3 Connect Nexus 5 to MMW and click auto-sync
-->No content syncs!!

Debug log uploaded.
Tagstodoc-help
Fixed in build384

Relationships

related to 0010942 resolvedmarek MMA playlists aren't in sync with Playlists in other apps 
related to 0011458 closedmarek Error after initial sync in Kit Kat 
related to 0012087 resolvedmarek Changes to Playlists in the Android Media Store aren't picked up by MMA 
related to 0012526 closedmarek MediaScanner runs endlessly (regression) 

Activities

rusty

2013-12-19 16:25

administrator   ~0038853

Note: when I performed this test again, synchronization worked correctly. Hopefully the debug logs will give a clue as to why this happened.

rusty

2013-12-19 16:36

administrator   ~0038854

Last edited: 2013-12-19 16:45

Further testing reveals that MMW sees content on the device that has already been deleted in MMA. In other words, the bug is that even though content has been deleted in MMA, the Android Media Store is unaware!

The sync worked on the second occasion because the Android Media Store eventually got updated.

rusty

2013-12-19 16:48

administrator   ~0038855

Last edited: 2013-12-19 18:06

Setting to 1.0.5 because the problem solves itself it the user runs MMA for a few minutes.

EDIT: it turns out that the problem doesn't resolve itself--although the deleted apps don't show up when browsing the device over MTP (using MMW), Google Play Music and any other App continue to show the deleted tracks (but not the deleted playlists).

Reset target back to 1.0.4.

marek

2013-12-19 23:53

developer   ~0038893

You have to wait till tracks are deleted. I know that optimization is needed. I have optimized refresh of deleted playlists but refresh of tracks won't be so simple. I would rather postpone it. It is not slower than before...it is actually much faster due to optimizations of other operations.

But I have discovered that the behaviour is following:

1. I start scanning of sd card due to deletion of some files
2. After some time it disappears from MTP (for me approximately 20 seconds)
3. Scan is finished completely (for me approximately 1 minute 20 seconds ) and it disappears from apps

So it looks like MTP is refreshed earlier...when the deleted files are processed by scanned. But other apps are refreshed when whole card is scanned.

Please try it again. Is it what you observe ? (please try build 205)

You can send logs eventually to see how long it takes for you.

rusty

2013-12-20 03:34

administrator   ~0038899

Last edited: 2013-12-20 06:22

Retested build 105 on a Nexus7/JB 4.3 and Nexus 5/Kitkat 4.4. On both devices, tracks that were deleted in MMA failed to delete from the device.

Nexus 5
Log ID: BHYCQCZ7AD (5 minutes)
Log ID: LVO6CRNMK2 (10 minutes)

Nexus 7
Log ID: WO83GSFP2W (6 minutes)
Log ID: 6ICNLEBLE9 (0000025:0000030 minutes)

On the Nexus 7, when I manually trigger a refresh of the Media Store using Player Pro, Google Play updates and stops displaying the deleted tracks. If I do the same using MMA's 'Check for new media' function, the tracks continue to display in Google Play.

On the Nexus 5, such manual refreshes aren't supported due to API changes in Kitkat (although if the 'phantom tracks' are then manually deleted in Player Pro, then they no longer appear in Play Music).

marek

2013-12-20 23:14

developer   ~0038926

This is unfortunately not fixable now.

In build 206 I have added old way how to refresh deleted tracks. It is not usable for Kitkat devices. Some further investigation has to be done in the future.

rusty

2014-09-29 18:47

administrator   ~0040641

This should really be fixed. i.e. Edits to tracks in MMA should propagate to the Android Media Store.

Note: I tested this out with other apps, and the problem doesn't occur. e.g.
Delete track in MMA, Open Google Play Music, --> Track remains!
Delete track in Player Pro, Open Google Play Music, --> Track is deleted immediately.

marek

2014-12-02 00:16

developer   ~0041257

Fixed in build 345

rusty

2014-12-04 05:37

administrator   ~0041307

Last edited: 2014-12-11 15:13

Tested 348 against MMW 1723 and found that:
- Upon Wi-Fi synch of tracks/playlists to MMA, the tracks did not appear in Google Music, and the Playlists--although they appeared in Google Music--were all empty. (Tested with Samsung Galaxy 8.4 Pro)!

- On a Nexus 5, some of the playlists appeared partially populated, but most were empty.

Debug log ID MXU2Y9UKNF illustrates this. Performed a sync operation that added one new playlist (Sync testlist 11630) containing 3 tracks (01 Astronomie Domine, 01 Cluster One, 01 Working Man). After syncing, the 3 tracks appeared in Google Play, BUT the playlist appeared empty.

marek

2014-12-12 22:57

developer   ~0041451

Fixed in build 355

rusty

2014-12-13 23:05

administrator   ~0041457

Build 355 works partially with MMA 1724. The Playlist is created, and isn't empty, but only the first two tracks of the playlist appear in Google Play!

A related issue (probably merits its own bug) is that Playlists that are synced to External storage result in the creation of an empty playlist in Google Play (empty because the tracks are stored to an inaccessible location). In such cases, a playlist shouldn't be synced with the Media Store.

Log ID N35H1G0KSL

marek

2015-01-12 10:38

developer   ~0041647

Last edited: 2015-01-12 10:38

I am not able to replicate it. All playlists are visible with all content in Google Music Play app.

I have added some logs to build 364. So please re-send me logs after sync when playlists are not valid in MediaStore

rusty

2015-01-13 15:22

administrator   ~0041673

Last edited: 2015-01-14 21:29

Tested build 364, and the problems still occur. Tested by:
1) Syncing 1 static playlist 'Volume Test' containing 8 tracks. 2 of the tracks were 'John the revelator', and neither appeared in Google Play.
Log immediately after sync: D40RC0PMUJ
Log immediately after verifying that John the Revelator is missing in Google Music: PGUK3GM5DL

2) Syncing 1 dynamic playlist 'unrated' consisting of a random selection of 25 tracks that hadn't been rated (in place of a previous selection of unrated tracks). For this sync list, the first 6 tracks appear correctly in Google Play, but others appear out of order. Over time, the order of the tracks gradually starts correcting (i.e. each time the media scan occurs a couple of additional tracks get placed in the correct order in Google Play), until the order is completely correct.
Debug log: GH7JNRZ4NQ (updated)

3) 'The Who - Won't Get Fooled Again' is missing artwork in Google Play even though the original track contains an artwork tag and folder.jpg. Any idea why this might be the case?

4) The Google Play library contains tons of 'phantom' entries that don't link to actual files. Presumably these 'phantoms' were synced and deleted by earlier versions of MMA in which track deletion failed to update the Android database. Is there a way to delete such unlinked tracks during a sync operation? One idea would be to add the following to the Delete confirmation list:
[ ] [Clean unlinked tracks from the Android DB]

5) 'Removing track from playlist' resulted in the playlist in being updated in Google Play. However, 'Remove track from playlist and delete from device', doesn't remove the track from the playlist and leaves a 'phantom' entry in Google Play.

marek

2015-01-14 23:33

developer   ~0041710

2) I am not able to fix it. MediaStore contains this playlist with correct order. You can check it in other apps that use MediaStore DB (like Player Pro) that shows correct order.

marek

2015-01-15 11:31

developer   ~0041715

1)
According to logs, it looks like:
1. I can see only IDs of tracks in playlists....but I see there two tracks with same ID that is much lower that the rest of IDs - this is the John the revelator track
2. MMA correctly inserts this track to playlist in MediaStore
3. MediaStore didn't add this track for some reason

I think that the low ID is quite suspicious. It means that the track is much older than the rest. I don't see download of this track but it is probably not much older that other tracks.

I think that it is possible that MMA's John the revelator track is paired with some old phantom track that is not available that is why I cannot replicate it.

I will finish removing of phantom tracks and I will add some logs to get details about it from MediaStore.

marek

2015-01-15 20:49

developer   ~0041720

1) I have added logging to build 367

3) MMA doesn't insert any data to MediaStore. MediaScanner does it. So I don't know what is the issue. Maybe some kind of incompatibility of jpeg? Is the jpeg valid?

4) Fixed in build 367

I have quite refactored Audio and Video sync with MediaStore. Unavailable tracks are now deleted.

5) Fixed in build 367

Playlist wasn't updated.

rusty

2015-01-16 00:19

administrator   ~0041729

Tested 368

1) Further testing shows that this problem occurs for tracks that are already on the device. e.g.
1 Playlist 'Good Stuff' contains: 1000 tracks including 'John the Revelator' and 'I've done all the dumb things'.
2 Add 'I've done all the dumb things' to playlist 'Volume Test'
3 Sync Playlist 'Volume Test'
--> All tracks sync correctly, but the 2 that are also on 'Good Stuff' don't appear in Google Music or Player Pro (i.e. even if they are synced to the Media Store, other apps don't detect them).

Note however, that the 'Good Stuff' playlist, which should contain 1142 tracks, only contains 0000019:0000050 tracks (both in Google Music and Player Pro)!!

Debug log ID RCS8CBGWO5

2) You're correct. It seems to be a bug in Google Music.

3) This seems to be working for some reason in build 368.

4) Verified--all the tracks in Google Play can now play.

5) Verified.

rusty

2015-01-16 15:52

administrator   ~0041742

Last edited: 2015-01-16 19:59

6a) Note also that all content that is synced to an external sd card (on a Galaxy Tablet) doesn't appear within Google Play. I suppose that this is expected behavior since the content is synced to an MMA-only directory. If so, this should probably be documented.

6b) Conversely, all playlists that are synced to an external sd card do appear within Google Music, but the playlists are empty! This has the side effect of making OK Google Listen to Playlist X commands not work on kitkat devices (because kitkat has a bug that OK Google always opens Google Music if the searched track/playlist is present there). Moreover--deleting the empty playlists in Google Music has the effect of deleting the populated playlists in MMA. I would suggest that MMA shouldn't sync playlists to the Media Store if it's unable to sync the playlist tracks as well.

marek

2015-01-16 22:11

developer   ~0041752

Could you please retest 1) with new build 370.

I have found out that it really take some time before MediaScanner starts to scan new files. MediaStore sync shouldn't be started before all tracks are scanned by MediaScanner. So now wifi sync waits till all tracks are scanned and after that it launches mediastore sync.

rusty

2015-01-19 03:00

administrator   ~0041767

Tested 370 and bug 1) occurs exactly as before.

Debug log: T1VU5VO6BZ

marek

2015-01-19 16:32

developer   ~0041771

1) Scanning was moved to MediaStore sync service. So this sync might take more time when MMA waits for MediaScanner. But now it is ensured that all tracks are already in MediaStore and paired with MMA before playlist sync starts.

Please retry it.

Fixed in build 371

rusty

2015-01-19 17:40

administrator   ~0041775

Last edited: 2015-01-19 18:03

Tested 371 and re. 1) and it seems that content is now synced correctly with the Android Media Store, evidenced by the fact that tracks synced with MediaMonkey appear in the Media Store and in other players such as Player Pro and N7.

However, Google Music seems to exhibit a number of bugs in terms of keeping in sync with the Android Media Store:
- 'Good stuff' playlist only contains 59/1000+ tracks in Google Music
- 'Volume test' playlist is still missing 'John the revelator' and 'I've done all the dumb things' in Google Music.
- 'Unrated' tracks appear out of order in Google Music

Requires further investigation to see whether this is an MMA issue or not.

Log ID: 7UX0SLVR8Q

marek

2015-01-19 22:26

developer   ~0041781

6) I have found one bug that caused failure during wifi sync... it was related only to limited write storages.

This might cause both a) and certainly b) issue.

Fixed in build 372

rusty

2015-01-20 14:00

administrator   ~0041788

Last edited: 2015-01-20 14:02

Tested 372 and both items 6a) and 6b) remain open. i.e. Playlists synced to SD Card appear correctly in MM, but appear empty in Samsung Media Player / Player Pro / Google Music.

Moreover, if the empty playlist is deleted in Google Music, then the populated version of the playlist is deleted from MMA.

Debug log from MMA after having deleted 'Tia's Music' (a playlist) in Google Play:
EOSSCPQOBV

rusty

2015-01-21 15:42

administrator   ~0041808

Generated new debug logs with build 372 on Samsung Galaxy Tab running Android 4.4.2, re. Synchronization of playlists to the SD Card (external):

1 Sync 'Volume test' playlist with 372, and wait for mediastore sync to complete
Debug log: F76FKJT2KE
-->Google Music and Player Pro both show 'Volume Test' but it's empty
2 Delete empty 'Volume Test' playlist in Google Music and then run MMA
--> After mediastore syncs, 'Volume Test' disappears from MMA
Debug log: YKJRNUPMVQ

rusty

2015-01-22 05:07

administrator   ~0041810

Generated new debug logs with build 375 on Samsung Galaxy Tab running Android 4.4.2, re. Synchronization of playlists to the SD Card (external):

1 Sync 'Volume test' playlist with 372, and wait for mediastore sync to complete
Debug log: X1212KF9AE
-->Google Music and Player Pro both show 'Volume Test' but it's empty

rusty

2015-01-22 15:41

administrator   ~0041819

Last edited: 2015-01-22 15:42

Fixed by Marek in 376.

rusty

2015-01-23 05:00

administrator   ~0041834

Last edited: 2015-01-23 16:48

Issue 6a/b is still open in 381.

EDIT: tested 382 and 11630 issue 6 isn't resolved. i.e. tracks/playlists that are synced to the SD Card and appear in MM, do not appear in Google Music / Player Pro.
Debug log: 96OXX6MFZO

I'd love to see this fixed, but if it's not possible, I would suggest that if a device doesn't scan files from \Android\data\com.ventismedia.android.mediamonkeybeta\files\Music\ to the Android Media Store, then it should also prevent Playlists from being synced to the Android Media Store as well (since the playlists will be empty).

rusty

2015-01-26 21:41

administrator   ~0041857

Tested 383:
With this build when syncing a playlist 'Volume Test' to external memory on the Galaxy tab pro 8.4, the playlist appears in MMA, and no playlist appears in Google Music or Player Pro (which is preferable to an empty playlist as had been the case previously).

Debug log: BDH7DC0XOU

rusty

2015-01-27 13:45

administrator   ~0041866

So as of build 383, all issues except the following are fixed:
2) Playlist tracks out of order in Google Music. This seems to be a bug in Google Music, since the tracks are in the correct order in the Android Media Store.

6) On some kitkat devices (e.g. Samsung Tab Pro 8.4), for tracks/playlists that are synced to external storage, the playlist/tracks don't appear in the Media Store, despite the fact that they sync correctly to MMA. This appears to be a limitation on those devices, and it seems that the only possible fix will arrive once lollipop is suppported on those devices.

In other words, this issue can be resolved as soon as all test code is removed.

Lollipop external storage support is tracked at 0012299

marek

2015-01-27 23:44

developer   ~0041870

Fixed in build 384