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

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Thanks. The stats.xml file was the crack in the bottle. GMMP did not created it automatically, so it doesn’t exist until I saved stats manually. I thought GMMP creates stats.xml after installing, but doesn‘t (at least not on my phone).

You might need to test if it's actually syncing playcounts back without you having to manually create the file each time.

GMMP can create the stats file when requested by an app but maybe it checked for the file first and threw an error before sending the request to GMMP so it never got created. I suspect kimt1688 setup the app to only check for access permission to that file when the app is first installed which is a problem if the file doesn't exist yet.

They should be able to alter the app to check for permissions after requesting GMMP to create the file and prompt the user to allow permissions if they don't currently exist.

Babydoll32

  • Full Member
  • ***
  • Posts: 180

You might need to test if it's actually syncing playcounts back without you having to manually create the file each time.

GMMP can create the stats file when requested by an app but maybe it checked for the file first and threw an error before sending the request to GMMP so it never got created. I suspect kimt1688 setup the app to only check for access permission to that file when the app is first installed which is a problem if the file doesn't exist yet.

They should be able to alter the app to check for permissions after requesting GMMP to create the file and prompt the user to allow permissions if they don't currently exist.

Ok. I tested a few things and it’s a little strange. When I change a rating, while sync app is open and try to sync new rating, preview is fine and shows rating change, sync runs without error. But Musicbee does nothing. When I restart syncing app, it updates playcounts and ratings. Increasing of playcount is also correct, BUT skipcount won‘t change, but it’s in GMMP title info and also in stats.xml. I don’t know if GMMP created playlists should sync to MB, it doesn’t for me.

BoringName

  • Sr. Member
  • ****
  • Posts: 916

You might need to test if it's actually syncing playcounts back without you having to manually create the file each time.

GMMP can create the stats file when requested by an app but maybe it checked for the file first and threw an error before sending the request to GMMP so it never got created. I suspect kimt1688 setup the app to only check for access permission to that file when the app is first installed which is a problem if the file doesn't exist yet.

They should be able to alter the app to check for permissions after requesting GMMP to create the file and prompt the user to allow permissions if they don't currently exist.

Ok. I tested a few things and it’s a little strange. When I change a rating, while sync app is open and try to sync new rating, preview is fine and shows rating change, sync runs without error. But Musicbee does nothing. When I restart syncing app, it updates playcounts and ratings. Increasing of playcount is also correct, BUT skipcount won‘t change, but it’s in GMMP title info and also in stats.xml. I don’t know if GMMP created playlists should sync to MB, it doesn’t for me.

It might not be coded to do skip counts yet. kimt1688 will have to answer that one.

For the playlists you need to make sure the "playlists path" field in musicbee device settings is the same as GMMP. This is "GMMP\playlists".

In GMMP classic you can set a custom folder for playlists, you just have to change musicbee to match it.

kimt1688

  • Jr. Member
  • **
  • Posts: 109

You might need to test if it's actually syncing playcounts back without you having to manually create the file each time.

GMMP can create the stats file when requested by an app but maybe it checked for the file first and threw an error before sending the request to GMMP so it never got created. I suspect kimt1688 setup the app to only check for access permission to that file when the app is first installed which is a problem if the file doesn't exist yet.

They should be able to alter the app to check for permissions after requesting GMMP to create the file and prompt the user to allow permissions if they don't currently exist.

Ok. I tested a few things and it’s a little strange. When I change a rating, while sync app is open and try to sync new rating, preview is fine and shows rating change, sync runs without error. But Musicbee does nothing. When I restart syncing app, it updates playcounts and ratings. Increasing of playcount is also correct, BUT skipcount won‘t change, but it’s in GMMP title info and also in stats.xml. I don’t know if GMMP created playlists should sync to MB, it doesn’t for me.

As for Sync in Rating, nothing has been changed since the original, so the behavior should remain the same.
Basically, Sync has not been changed much from the original at the source level.
Skipcount was not originally looked at.
If it is GMMP, the point I first checked the location of stats.xml and made sure to use that.
If it is Poweramp I changed to use Poweramp's API to get the values, so the only thing that has changed is how I get the values.
I found a little bit of error checking in my own code that I will fix in the next version, though.
The Sync items and their results, necessary and non-essential, can be changed during open testing if requested.
I hope you will discuss whether or not the specification needs to be changed, such as whether or not to keep Sync for playlists, etc.

Babydoll32

  • Full Member
  • ***
  • Posts: 180
As for Sync in Rating, nothing has been changed since the original, so the behavior should remain the same.
Basically, Sync has not been changed much from the original at the source level.
Skipcount was not originally looked at.
If it is GMMP, the point I first checked the location of stats.xml and made sure to use that.
If it is Poweramp I changed to use Poweramp's API to get the values, so the only thing that has changed is how I get the values.
I found a little bit of error checking in my own code that I will fix in the next version, though.
The Sync items and their results, necessary and non-essential, can be changed during open testing if requested.
I hope you will discuss whether or not the specification needs to be changed, such as whether or not to keep Sync for playlists, etc.

Hi, as first thanks for answering and much more, thanks for reanimation of the sync app.
I didn't used the old tool as much, cause of malfunctions on later Android versions.
The funny thing with ratings is, that preview shows the updated rating, syncs without errors, but won't update the rating.
I need to close sync app, have to restart and resync and then it updates.
That skipcount wasn't implemented in original I didn't know, but would be good for creating auto-playlists and the autorating tool.
Syncing back playlists, I have to test solution of BoringName, next days.

kimt1688

  • Jr. Member
  • **
  • Posts: 109
Release note
Version 2.7.3
changed the availability of items on the main screen according to the selection of players to be reverse-synced
Deleted original playlist file after sync when MusicBee is set to m3u8 playlist (.m3u8.m3u file remains)
Bug fixes

Version 2.7.4
Added an in-process dialog to the all-file scan at first startup
Added a menu item "regist MediaStore" for wired Sync users to all-file scan.
An error message is now displayed when artwork is not embedded and a file other than an audio file is received.


I did not inform you, I had released 2.7.3.
I am now in the process of submitting 2.7.4 to Google.
The release notes for each are above.
The all file scan is still required the first time it is launched,
but I have added it to the main screen menu so that it can be performed without deleting data from the app when wired Sync is done in the middle of use.
I believe that this almost completes the bug fixes and implementation review for all items except reverse sync.
If there are bug reports, I will respond to them on a priority basis, but from now on I will focus on reverse sync.

One more point: I often say "in the original" about the reverse sync,
but the reason I am going to adapt the communication part to the original is to proceed with the development without affecting the MB itself.
I have no knowledge of the communication protocol of this application,
but by reading the source, I have "adapted" it to the original.
I believe that reverse-syncing or changing the behavior of new items requires careful consideration of whether or not the communication protocol can be changed and whether or not it will affect the MB itself.

Babydoll32

  • Full Member
  • ***
  • Posts: 180
Release note
Version 2.7.3
changed the availability of items on the main screen according to the selection of players to be reverse-synced
Deleted original playlist file after sync when MusicBee is set to m3u8 playlist (.m3u8.m3u file remains)
Bug fixes

Thanks a lot for further development. Reverse sync of ratings and playcounts works for me now, without closing the app before or manually save stats.xml.
Playlist reverse doesn't work for me, but that's not a big tragedy. Hope skip count is supported soon.
If you add a Paypal donation link, I would spend you a few bucks.

kimt1688

  • Jr. Member
  • **
  • Posts: 109
I found a bug in the reverse sync that probably exists from the original and does not depend on my coding.
It doesn't matter which comes first, for example, play a few songs in Poweramp and Sync in the app. The only item is Playcount, no problem.
Next, now play a few songs in GoneMAD and Sync in the app in the same way. The Playcount is also synced without any problem.
Play a few more songs in Poweramp and Sync again. Normally, the cache should be working, and only the playcount of this time should be reflected.
However, the Playcount for the first played is also reflected." Last Played" is not affected because there is no data.
Next, when I do the same thing with GoneMAD, the same phenomenon occurs.
I haven't followed the source yet, but when the latest playback history is retrieved, it is used for reverse sync,
and at the same time, it is kept as a cache for the next comparison, but something may be wrong with that.
For now, I will follow up the cache source for reverse sync while testing the normal usage of the system.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Any idea when 2.7.4 will be available from the Play Store? 2.7.3 is what's available now and I'm not going to waste my time with that version.

Thanks.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

kimt1688

  • Jr. Member
  • **
  • Posts: 109
Any idea when 2.7.4 will be available from the Play Store? 2.7.3 is what's available now and I'm not going to waste my time with that version.

Thanks.

2.7.4 has been submitted to Google for almost 24 hours now, so I would expect it to be released soon if things look the way they usually do.

Thanks.

kimt1688

  • Jr. Member
  • **
  • Posts: 109
I found a bug in the reverse sync that probably exists from the original and does not depend on my coding.
It doesn't matter which comes first, for example, play a few songs in Poweramp and Sync in the app. The only item is Playcount, no problem.
Next, now play a few songs in GoneMAD and Sync in the app in the same way. The Playcount is also synced without any problem.
Play a few more songs in Poweramp and Sync again. Normally, the cache should be working, and only the playcount of this time should be reflected.
However, the Playcount for the first played is also reflected." Last Played" is not affected because there is no data.
Next, when I do the same thing with GoneMAD, the same phenomenon occurs.
I haven't followed the source yet, but when the latest playback history is retrieved, it is used for reverse sync,
and at the same time, it is kept as a cache for the next comparison, but something may be wrong with that.
For now, I will follow up the cache source for reverse sync while testing the normal usage of the system.

I read the source and found the reason to be very simple.
It is good that the result of the last Sync is saved as a cache file, but the file name is fixed regardless of the music player used.
I guess the assumption is that one only uses one of the music players.
If you want to fix this, it would be better to use two separate cache files for different purposes.

kimt1688

  • Jr. Member
  • **
  • Posts: 109
Any idea when 2.7.4 will be available from the Play Store? 2.7.3 is what's available now and I'm not going to waste my time with that version.

Thanks.

2.7.4 has been submitted to Google for almost 24 hours now, so I would expect it to be released soon if things look the way they usually do.

Thanks.

2.7.4 is now in the store.
Please test it and try the new features.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
2.7.4 is now in the store.
To save time, instead of syncing my 20+ playlists, I decided to only sync one. Which had two files that had been updated earlier today.
Preview showed two files to be synced plus one playlist.
Still getting the pop-up asking for permission to modify tracks.
WiFi App said "completed successfully."
MB Status Bar said "synchronization failed."
Playlist not copied over to tablet.

MB's Error Log...
Code
8/14/2024 11:15:31 AM - Add playlist "G:\MusicBee\phred\Playlists\__Favorites.mbp" Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

App's Error Log...
Code
2024-08-14: ping: socket ok=/192.168.1.101
11:13:42: ping: hello=MusicBeeWifiSyncServer/1.0
11:13:42: ping: matched=/192.168.1.101,status=OK
11:13:49: startSync: preview=true,iteration=0
11:13:49: command: action=SYNC_START
11:13:49: tryStart: connecting /192.168.1.101, attempt=0
11:13:49: tryStart: connected
11:13:49: tryStart:
hello=true,fromMB=true,custfiles=false,preview=true,dev=SM-T220,2
11:13:49: storage: path=/storage/D997-3128,root=null
11:13:49: syncDevice:
root=/storage/D997-3128,ignoreErrors=false,playlists=false,ratings=false,playcount=false
11:13:49: syncDevice: command=ShowResults
11:13:49: syncDevice: command=GetFiles
11:13:49: getFiles: Get: Music/,url=/storage/D997-3128/Music/, inc=true
11:13:49: getFiles: DATA: : _data
11:13:49: getFiles: selection: : date_modified > 0
11:13:49: getFiles: count=207
11:13:50: syncDevice: command=GetFiles
11:13:50: getFiles: Get:
Music/Podcasts/,url=/storage/D997-3128/Music/Podcasts/, inc=true
11:13:50: getFiles: DATA: : _data
11:13:50: getFiles: selection: : date_modified > 0
11:13:50: getFiles: count=207
11:13:50: syncDevice: command=GetFiles
11:13:50: getFiles: Get: Playlists/,url=/storage/D997-3128/Playlists/,
inc=false
11:13:50: getFiles: DATA: : _data
11:13:50: getFiles: selection: : date_modified > 0
11:13:50: getFiles: count=207
11:13:50: syncDevice: command=ShowPreviewResults
11:13:50: syncDevice: exit
11:13:56: startSync: preview=false,iteration=1
11:13:56: command: action=SYNC_START
11:13:56: tryStart: connecting /192.168.1.101, attempt=0
11:13:56: tryStart: connected
11:13:56: tryStart:
hello=true,fromMB=true,custfiles=false,preview=false,dev=SM-T220,2
11:13:56: storage: path=/storage/D997-3128,root=null
11:13:56: syncDevice:
root=/storage/D997-3128,ignoreErrors=false,playlists=false,ratings=false,playcount=false
11:13:56: syncDevice: command=ShowResults
11:13:56: syncDevice: command=GetFiles
11:13:56: getFiles: Get: Playlists/,url=/storage/D997-3128/Playlists/,
inc=false
11:13:56: getFiles: DATA: : _data
11:13:56: getFiles: selection: : date_modified > 0
11:13:56: getFiles: count=207
11:13:56: syncDevice: command=ReceiveFile
11:13:59: syncDevice: command=ReceiveFile
11:14:01: syncDevice: command=ReceiveFile
11:15:32: syncDevice: command=Exit
11:15:32: exitSync: fails=0
11:15:32: waitScanFiles: start
11:15:32: waitScanFiles: done
11:15:32: syncDevice: exit
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

kimt1688

  • Jr. Member
  • **
  • Posts: 109
App's Error Log...
Code
2024-08-14: ping: socket ok=/192.168.1.101
11:13:42: ping: hello=MusicBeeWifiSyncServer/1.0
11:13:42: ping: matched=/192.168.1.101,status=OK
11:13:49: startSync: preview=true,iteration=0
11:13:49: command: action=SYNC_START
11:13:49: tryStart: connecting /192.168.1.101, attempt=0
11:13:49: tryStart: connected
11:13:49: tryStart:
hello=true,fromMB=true,custfiles=false,preview=true,dev=SM-T220,2
11:13:49: storage: path=/storage/D997-3128,root=null
11:13:49: syncDevice:
root=/storage/D997-3128,ignoreErrors=false,playlists=false,ratings=false,playcount=false
11:13:49: syncDevice: command=ShowResults
11:13:49: syncDevice: command=GetFiles
11:13:49: getFiles: Get: Music/,url=/storage/D997-3128/Music/, inc=true
11:13:49: getFiles: DATA: : _data
11:13:49: getFiles: selection: : date_modified > 0
11:13:49: getFiles: count=207
11:13:50: syncDevice: command=GetFiles
11:13:50: getFiles: Get:
Music/Podcasts/,url=/storage/D997-3128/Music/Podcasts/, inc=true
11:13:50: getFiles: DATA: : _data
11:13:50: getFiles: selection: : date_modified > 0
11:13:50: getFiles: count=207
11:13:50: syncDevice: command=GetFiles
11:13:50: getFiles: Get: Playlists/,url=/storage/D997-3128/Playlists/,
inc=false
11:13:50: getFiles: DATA: : _data
11:13:50: getFiles: selection: : date_modified > 0
11:13:50: getFiles: count=207
11:13:50: syncDevice: command=ShowPreviewResults
11:13:50: syncDevice: exit
11:13:56: startSync: preview=false,iteration=1
11:13:56: command: action=SYNC_START
11:13:56: tryStart: connecting /192.168.1.101, attempt=0
11:13:56: tryStart: connected
11:13:56: tryStart:
hello=true,fromMB=true,custfiles=false,preview=false,dev=SM-T220,2
11:13:56: storage: path=/storage/D997-3128,root=null
11:13:56: syncDevice:
root=/storage/D997-3128,ignoreErrors=false,playlists=false,ratings=false,playcount=false
11:13:56: syncDevice: command=ShowResults
11:13:56: syncDevice: command=GetFiles
11:13:56: getFiles: Get: Playlists/,url=/storage/D997-3128/Playlists/,
inc=false
11:13:56: getFiles: DATA: : _data
11:13:56: getFiles: selection: : date_modified > 0
11:13:56: getFiles: count=207
11:13:56: syncDevice: command=ReceiveFile
11:13:59: syncDevice: command=ReceiveFile
11:14:01: syncDevice: command=ReceiveFile
11:15:32: syncDevice: command=Exit
11:15:32: exitSync: fails=0
11:15:32: waitScanFiles: start
11:15:32: waitScanFiles: done
11:15:32: syncDevice: exit

“App's Error Log...” I was curious to see the line “11:13:50: getFiles: Get: Playlists/,url=/storage/D997-3128/Playlists/” in
What are the settings for the MB device?
Can you post a screenshot of the bottom half of the MB device settings screen (I need the bottom half because it scrolls)?

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Playlist not copied over to tablet.

Most likely because your Playlist folder is not within your Music folder and the app doesn't have permissions to access it.

If you move your playlist folder into the music folder eg) storage/D997-3128/Music/Playlists/

Change the playlist path in Device settings in Musicbee and run another sync I reckon it will probably work.