Author Topic: Wifi android device synching  (Read 310590 times)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
I have the reverse sync from GoneMad player done and will make it available after some more testing.
This is to note how the reverse sync works while its fresh in my head

- new playlists added to gmmp will reverse synced back to musicbee
- updated playlists only if the file modification date/time is more recent (+90 mins buffer to reduce potential issues due to daylight saving or other clock differences). The playlist name must uniquely match a single musicbee playlist name
- files within a playlist must match an equivalent file already in your musicbee library. The matching is done by comparing the device filename to the expected filename that musicbee would sync to based on the device sync naming template used. If there are one or more files that cant be matched, you are given the choice to still sync a partially complete playlist ie. the unmatched files are excluded from the playlist
- ratings set in gmmp can be synched back to MusicBee. Only tracks that have been rated in gmmp since the last reverse sync are sent - so that means that on the first reverse sync, no ratings will be sent back to MB even if you have at some point in the past changed the rating only on the device
- playcounts from gmmp can be incrementally added back to musicbee. On the first reverse sync, a the full playcount will be sync'ed back. And then after that only the change in playcount will be sent.

frankz

  • Sr. Member
  • ****
  • Posts: 3834
This is exciting.

Two questions:
1. Is last played date sent with the play count, or is it just the counts?
2. It it possible to pick and choose what to sync?  In other words, just ratings, just playlists, some combination of these, or is it an all or nothing thing?

What I would love to do would be to get out of using last.fm sync and just directly communicate between GMMP and MB, but I use last played and ratings heavily.  If last played isn't sync'd, I'd still want the ratings and use last.fm for the play data.  That's why I ask.

I guess I have one more question on the last point you highlighted.  My GMMP play count is already in MB from last.fm.  Am I right that doing this reverse sync would double those?  If so, I'll just delete my GMMP database before doing my first sync, which is easy enough, I just want to check that it's necessary to avoid double counts.


Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
1. Is last played date sent with the play count, or is it just the counts?
2. It it possible to pick and choose what to sync?  In other words, just ratings, just playlists, some combination of these, or is it an all or nothing thing?
I overlooked 1. but will include that
and for 2., you can choose playlists; ratings; and playcounts separately eg. you could just sync only playlists

I guess I have one more question on the last point you highlighted.  My GMMP play count is already in MB from last.fm.  Am I right that doing this reverse sync would double those?  If so, I'll just delete my GMMP database before doing my first sync, which is easy enough, I just want to check that it's necessary to avoid double counts.
yes reverse sync would effectively double the playcount from gmmp if you already use last.fm
Last Edit: April 11, 2019, 08:01:42 PM by Steven

frankz

  • Sr. Member
  • ****
  • Posts: 3834
That sounds perfect.  I'm looking to get away from the last.fm sync, so having GMMP and MB work together directly will be fantastic. 

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
This sounds so awesome! I still have trouble with my phone being able to find MusicBee on the network. Do you have any ideas on troubleshooting?
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
This sounds so awesome! I still have trouble with my phone being able to find MusicBee on the network. Do you have any ideas on troubleshooting?
Check the musicbee error log. Otherwise i am not expert enough on network connectivity to be able to help

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Hah, me neither. But here's the error that shows up:

...

Update: naturally, once I posted this it started working. Except now when I start the sync I get a "synchronization cancelled" message. But no new errors.

Further update: I think something had gone haywire with my Windows firewall. I made sure my network was listed as private, and reset the firewall settings, and it seems to be happy now. I also had two configurations for my device, so I deleted both and made a new one, for good measure. Completed a full sync overnight. Hooray!
Last Edit: April 12, 2019, 05:27:28 PM by psychoadept
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

redwing

  • Guest
How's the reverse sync work? Does it require wifi sync app too?

This sounds a perfect candidate for premium feature, meaning not everybody needs it but the development and maintenance require lots of efforts.

I'd suggest you bundle the two features into a single android app and sell it. That will help you compensate the MB server cost.
Last Edit: April 13, 2019, 03:44:58 AM by redwing

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
How's the reverse sync work? Does it require wifi sync app too?

This sounds a perfect candidate for premium feature, meaning not everybody needs it but the development and maintenance require lots of efforts.

I'd suggest you bundle the two features into a single android app and sell it. That will help you compensate the MB server cost.
Yes both sync modes require an app running on the device.
I think what i will do is attempt to add PowerAmp player (not promising) and then open source the app so others can enhance it to include other players. I wont have the time to maintain this beyond fixing bugs.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
Reverse sync for GoneMad player is now available on the Android Internal Testing track. It's accessed from the vertical ... button in the action bar.
Send me an email with your google play account if you want to try it out and havent already sent it to me.
https://play.google.com/apps/internaltest/4700978781087552506

You will need the latest v3.3 patch version (3.3.7042+)
https://getmusicbee.com/patches/MusicBee33_Patched.zip

You should do one full sync using 3.3.7042+ first otherwise the first reverse sync will unnecessarily send back all playlists even though they were not modified on the device.

MCDoubleDefDP

  • Jr. Member
  • **
  • Posts: 36
Is anyone else having trouble getting the GoneMAD reverse sync to work? I can sync my library of 10,800+ songs one-way from MusicBee to my phone just fine using the wifi app, but couldn't get reverse sync to work, so I removed all my music from my phone and tried syncing a test library of 3 songs. I did a regular sync using the wifi app and then played songs a few times and changed their ratings, but no matter how many times I try, reverse sync isn't working.

If I press the Reverse Sync Preview button, the loading circle will either spin indefinitely while the sync notification disappears after about 15 seconds, the app will close (like %5 of the time) or I will get a message saying no changes have been found (like 2%). In any case, it never gives me a preview of changes it's detected.

If I don't preview and just try Sync Now, I'll get the successful sync message, but nothing changes on MusicBee Desktop's side after rescanning the files for changes.

Am I doing something wrong?

I updated MusicBee to 3.3.7042 and the Wifi app to 0.5, and have tried both GoneMAD 2.2.2 stable and 3 alpha. Here is the error log:

Code
Apr 13, 2019 6:49:43 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:36 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:37 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:38 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:39 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:41 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:42 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:43 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:44 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:45 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:52:14 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
MCDoubleDefDP- please also check MB's error log for entries at or near the same time and post them here. It might be helpful to Steven to see the log from the desktop in addition to the device.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

MCDoubleDefDP

  • Jr. Member
  • **
  • Posts: 36
MCDoubleDefDP- please also check MB's error log for entries at or near the same time and post them here. It might be helpful to Steven to see the log from the desktop in addition to the device.

Thanks, good idea. I've added it the end of my original post below.

Is anyone else having trouble getting the GoneMAD reverse sync to work? I can sync my library of 10,800+ songs one-way from MusicBee to my phone just fine using the wifi app, but couldn't get reverse sync to work, so I removed all my music from my phone and tried syncing a test library of 3 songs. I did a regular sync using the wifi app and then played songs a few times and changed their ratings, but no matter how many times I try, reverse sync isn't working.

If I press the Reverse Sync Preview button, the loading circle will either spin indefinitely while the sync notification disappears after about 15 seconds, the app will close (like %5 of the time) or I will get a message saying no changes have been found (like 2%). In any case, it never gives me a preview of changes it's detected.

If I don't preview and just try Sync Now, I'll get the successful sync message, but nothing changes on MusicBee Desktop's side after rescanning the files for changes.

Am I doing something wrong?

I updated MusicBee to 3.3.7042 and the Wifi app to 0.5, and have tried both GoneMAD 2.2.2 stable and 3 alpha. Here is the error log:

Code
Apr 13, 2019 6:49:43 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:36 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:37 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:38 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:39 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:41 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:42 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:43 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:44 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:51:45 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
Apr 13, 2019 6:52:14 PM com.getmusicbee.musicbeewifisync.ErrorHandler logError
SEVERE: looper [Nexus 6P, 8.1.0, 0.5] command=SyncFromDevice: java.net.SocketException: java.io.EOFException
EDIT: Here is the only thing in the error log on desktop from today:

Code
4/13/2019 6:40:29 PM - Nexus 6P\Internal shared storage\ not mounted: 
4/13/2019 6:40:34 PM - Nexus 6P\Internal shared storage\ not mounted:
4/13/2019 6:41:05 PM - Nexus 6P\Internal shared storage\ not mounted:
4/13/2019 6:42:52 PM - Nexus 6P\Internal shared storage\ not mounted:
4/13/2019 6:55:21 PM - 10.0.17763.0 - 3.3.7042.33234 - System.TypeInitializationException: The type initializer for '#=zq3sj_2Ji6AWZH$Gtl7XVQ94=' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'MusicBeeBass.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at #=zq3sj_2Ji6AWZH$Gtl7XVQ94=.#=zqg6Q9n1zcJwOkyzz1jaO$wlvrDJ5()
   at #=zq3sj_2Ji6AWZH$Gtl7XVQ94=..cctor()
   --- End of inner exception stack trace ---
   at #=zq3sj_2Ji6AWZH$Gtl7XVQ94=.#=zE4TvAzw=()
   at #=zOL3eqixsFoKHdOwMQWtjWeVPBWiL.#=z0jdUktI=(#=zl5XMUBBlv0s5GMrXP1pGgjtWIDFJ #=zUM2bFz6am9OV, #=zKmWwdfBxdgqEOdxocgpm0MQLoFTS #=zLV_cwkg=)
   at #=zfSagU0q8ggJ2oC4$CYnTBrA=.#=ziFYQIAfnak5h(#=zczq8GPDYHlgfWauhAw== #=zUtilR1kvKCbM, String #=zpmV5tUU=)
   at #=zfSagU0q8ggJ2oC4$CYnTBrA=.#=zmqnSkxC00asi()

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
i did make an assumption that the /gmmp/stats.xml file was always on internal storage. Which card is that file actually stored for your device and is your internal storage card really not mounted?
Also your security software is removing musicbeebass.dll or you are running a partial install

edit:
I can see one mistake that might cause the issue. If it still happens can you still answer the above questions
v0.5.1
https://play.google.com/apps/internaltest/4700978781087552506
Last Edit: April 14, 2019, 10:49:59 AM by Steven

MCDoubleDefDP

  • Jr. Member
  • **
  • Posts: 36
i did make an assumption that the /gmmp/stats.xml file was always on internal storage. Which card is that file actually stored for your device and is your internal storage card really not mounted?
Also your security software is removing musicbeebass.dll or you are running a partial install

edit:
I can see one mistake that might cause the issue. If it still happens can you still answer the above questions
v0.5.1
https://play.google.com/apps/internaltest/4700978781087552506

I've just updated to 0.5.1 and tried running it again a few times. Unfortunately, it's still doing the same thing. To answer your questions:

1) I have a Nexus 6P which does not have any external storage capabilities. All of my apps are installed to the default location and I don't think you can customize where GMMP saves its backup files. The full path from root is root/sdcard/storage/emulated/0/gmmp/stats.xml, but Solid Explorer reports it as /sdcard/gmmp/stats.xml.

2) I also just checked and the MusicBeeBass.dll file is still located at C:\Program Files (x86)\MusicBee\MusicBeeBass.dll. I also use the default program location on my computer.

---

Since I was having the same problem when my library was only 3 songs, I assumed the amount of songs didn't matter and put everything back on my phone last night. Here is a recording of the issue I'm having in case it helps: https://photos.app.goo.gl/DScStsyX6YJbQfJL6.
1. Opened GMMP and listened to a track in full and changed its rating. (I did a normal wifi sync before the recording started that completes in about only a few seconds.)
2. Opened the wifi app and tried a reverse sync preview. Let it run for about 50 seconds until the notification disappeared.
3. Backed out of the preview to stop it and pressed the "sync now" button. Got a successful sync message after about 5 seconds.
4. Did a file rescan on MusicBee Desktop and the track did not update.