Hi there,
playlist issues seem to be a very frequent problem when it comes to sync a mobile device with MB. I'm sure there are plenty of reasons why somethings went wrong or simply doesn't work. One reason obviously is the huge variety of different devices, OS's and apps that support only different formats or simply have a very own strategy storing or handling playlists.
I decided to start a new thread here because to me it seems it could be a good way to sum up some basic knowledge about how Android devices handling playlists. So I hope this thread can keep seperate and will not be merged into a existing one.
Because I use an Android (6.0.1) device in connection with the Smasung Music App, I will focus on this setup in the following.
During testing the new MB WiFi-sync feature, I've experienced playlist sync problems again, even though it still work fine through MTP sync. So I've just started investigating and testing some things to find what's probably going wrong, respectively why my Android device has problems with synced playlists sometimes and sometimes not.
Problem 1:Playlist files seem to be discovered totally random by a media app like Samsung Music, if copied (manually) to any folder on my device. Most times they seem to be never discovered by any music app.
Problem 2:Playlist sync via MB WiFi-sync doesn't really work. Playlist files are transfered corretly and the Samsung Music app display them too, BUT the playlists shown in any media app are all empty - so they can't be used! To avoid any misunderstandings, the m3u files are totally intact and containing the correct paths to all media-files.
Long story shortened already - so far I've discovered following:+ Android uses an own internal media scanner, which builds up a database about all you media-files and also playlists. This database should be loacted somewhere here in most cases:
- /data/data/com.android.providers.media/databases/external-{some hex here}.db [or]
- /data/data/com.google.android.music/databases/music.db
I'm unsure which database is used under which condition, but that shouldn't be important here.
+ Music Apps like Samsung Music and others I suppose, just using this Android media store database.
+ Most times new files or playlists can NOT be discovered by any media app, just because the Android media scanner did NOT YET detect them!
+ I'm unsure
if the Android media scanner can be triggerd by any command via MTP or which events will lead to initialize a rescan. Anyhow, the Android media scanner can be triggered MANUALLY whith apps like these here:
"ScanMediaPlz"
https://play.google.com/store/apps/details?id=net.zhuoweizhang.scanmediaplzA few seconds later after you getting run it, you should find the playlists shown correctly in your media app, if they wasn't there before.
+ As long MB weird MTP-sync is used, the Android MTP handler always directly updates the Android media store database, so a rescan is unnecessary.
+ MB Wifi-Sync does/can? NOT use the Android MTP handler so the Android media scanner will be called by the app right after sync process is finished.
What I have observed:+ It should not matter where the playlist files located are. However, I'm unsure how the Android media scanner deals with relative or absolute paths inside the playlist files. I've used absolute paths inside M3U files, but putting them in a subfolder and it just worked!
+ No matter if using MB wired MTP- or WiFi-sync, in both cases paylist files themselves will just be copied fine in the specified folders on your device without problems.
+ Using MB MTP-sync,
MB additionaly seems to dicrectly write playlist information into the Android media store database or just trigger a media rescan automatically the Android MTP handler directly updates the media store database,
because so after the sync process is finished, playlists imediatly appear correctly in my media app!
+ Using MB Wifi-sync, the Wifi Sync App
seems also
to dicrectly write playlist information [names only] into the Android media store database,
because so after the sync process is finished, playlists imediatly appear in my media app - BUT as mentioned above, they are all empty! Under these condition a manual media rescan with "ScanMediaPlz" does NOT help. To recover this situation, I manually have to delete the playlists inside my media app (Samung Music), which in fact means, remove them from the Android media store database. After that, a manual media rescan with "ScanMediaPlz" leads to the expected result: Playlist listed corectly!
Questions and Answers Open questions and possible recommendations:+ Is it possible for a MTP host or any Android apps like "MB Wifi Sync" to directly write into the android media store?
A: This is done by the Android MTP handler but also can be done by an Android app, and it's currently done by the MB Wifi Sync app.
+ If so, is it really neccessary to transfer the playlist-files onto the Android device too?
A: If playlist informations would be written completely into the Android media store DB it would NOT be neccesary (my understanding so far).
+ Could it be possible that the app "MB Wifi Sync" just write faulty data to the android media store, or why it just generate empty playlists and why they can not be recovered by manualy trigger the Android media scanner?
A: MB Wifi Sync currently only writes playlist names but do not write the referenced files inside of these. Due to an obvious misbehave of the Android (6.0.1) media scanner, these playlist does not became updated (my understanding so far).
+ Could "MB Wifi Sync" just trigger the Android media scanner right after finishing the sync process, if it does not already?
A: Yes, and this should happen already.
I hope, I could bring some light into the topic for a few of you.
In addition I also hope to get even more light in to that topic, by some one who can answers the questions above.The most important goal, however, should be to make the synchronization reliable and robust for everyone. That would be awesome.
Wifi Sync definitely seems to be the way forward here!
Please also correct me if I made wrong statements here and there.
Thank You in advance,
Greetings
MB 3.3.7003
MB Wifi Sync 0.2.6
Android 6.0.1