kabouzeid / phonograph-issue-tracker

14 stars 0 forks source link

2 way synchronization does not work with MusicBee #234

Closed Uricorn closed 7 years ago

Uricorn commented 7 years ago

MusicBee has a setting allowing users to sync play counts and ratings, however when I synced my device it did not seem to import the play count. (I did not attempt to import ratings)

Usually I would open this type of issue to MusicBee but according to their wiki most Android apps aren't reporting the data to the database properly.

Quote taken from: http://musicbee.wikia.com/wiki/Devices#Settings

for MTP devices, the MTP database does have a field for rating and for play count. However in practice i have yet to see it being used by the android players. So until that happens 2-way sync wont do anything, and although MB is able to scrobble the difference in play count, in practice that won't do anything either

Is that the case with Phonograph or do you think it's a bug on their end?

arkon commented 7 years ago

Phonograph just relies on the internal Android media store for getting tracks and such. Play counts are stored in an internal database for Phonograph. I can't actually find any useful information about storing rating/play count data in the mentioned MTP database, unfortunately.

Uricorn commented 7 years ago

This is the response from the MusicBee dev:

https://getmusicbee.com/forum/index.php?topic=22287.0

i am afraid i dont know anything about how to access the MTP file data values from the android device side. For ratings this is the MTP field that is written to/ read from by MusicBee: WPD_MEDIA_USER_EFFECTIVE_RATING: WPD_MEDIA_USER_EFFECTIVE_RATING.fmtid = New Guid(785955333, 2771, 17116, 176, 208, 188, 149, 172, 57, 106, 200) WPD_MEDIA_USER_EFFECTIVE_RATING.pid = 17

a more common field might be the track title which i would expect an android media player to be retrieving some how WPD_MEDIA_TITLE.fmtid = New Guid(785955333, 2771, 17116, 176, 208, 188, 149, 172, 57, 106, 200) WPD_MEDIA_TITLE.pid = 18

(Disclaimer: I am not a developer)

I assume you get rating data from: https://developer.android.com/reference/android/media/Rating.html However I don't see any meta data fields for the play count: https://developer.android.com/reference/android/media/MediaMetadata.html

Perhaps it can be written with this? https://developer.android.com/reference/android/media/MediaMetadata.html#METADATA_KEY_MEDIA_URI

arkon commented 7 years ago

That's Android's media store metadata, which I don't think directly correlates with whatever this MTP database is. Unfortunately, I don't think we'd be able to support what MusicBee is doing unless there were changes to Android itself.