Sync back ratings & play counts (MSC) v1.9.3 2013-12-03

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.7 2012-10-08

Post by Aff »

Did you auto-sync to the external SD card? Was it before you did it to the internal? You can't sync to both of them at the same time.
You may follow the steps in http://www.mediamonkey.com/forum/viewto ... 88#p314520 to analyse your auto-sync info.

If there is no auto-sync info for your external SD card, it isn't possible to sync back with this script. There is another new script using only the XML file where I could change the logic in order to be independent from auto-sync, but I don't have any time to do that at the moment.
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.5 2012-09-02

Post by Aff »

NigriStriata wrote:The new Samsung Galaxy S3 only supports USB MTP mode.
There's no possibility to enable USB mass storage if the device isn't rooted.
naalex wrote:(...) my phone--Galaxy Nexus--doesn't support USB Mass Storage mode, only MTP. (...)
thiagorobis wrote:(...) For example, my phone only supports MTP mode. But I can access the folder and grab the PlayerPro. Generated xml. In would create an option to have displaced this file. Generated in xml mobile, so even manual, and update the library of MM? (...)(
Done. Please use the other script Sync stats for Android PlayerPro XML (MTP) 8)
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.5 2012-09-02

Post by Aff »

toyzrme wrote:Any suggestions (...) how I could fix this and not lose those 1,500 ratings?
I've created a script where you don't need any auto-sync: Import music stats from Songbird XML. You would have to:
  1. Attach your phone
  2. Start the import script
  3. Manually navigate to the phone's sd card drive, to the folder \PlayerPro\Stats\ and select the latest exported_??_???_??_??????_Songbird.xml file
If the XML doesn't contain all your ratings, you may have to import them from the mp3 to PlayerPro first: settings, Import music stats, Music files (ratings only).
toyzrme
Posts: 119
Joined: Mon Oct 08, 2012 2:31 pm
Location: Cary, NC
Contact:

Re: Sync back ratings & play counts (MSC) v1.7 2012-10-08

Post by toyzrme »

Wow - thanks for the quick response!
FYI I got an error on an embedded quote:

Error happened during script execution:
Error executing SQL "SELECT Songs.*
FROM Songs
WHERE Songs.Artist = "Ace of Base" AND Songs.SongTitle = "Waiting for Magic [Total Remix"]" AND Songs.Album = "The Sign"
": unrecognized token: "]" (1,1)

The offending line was:
<track>Waiting for Magic [Total Remix 7"]</track>
Environment:
MMW: ~25,000 tracks, MM.DB on 16Gbps PCIe SSD (Samsung 950 Pro) - up-to-date, not Beta
MMA: ~12,000 tracks sync'd to phone - up-to-date, not Beta
PC: Windows 10/64, Skylake quad+HT @4.2GHz, 64GB RAM, 14TB RAID6
Phone: Galaxy S10 (128GB) + 400GB mSD card (Samsung EVO+)
Sync: all tracks rated >=3 sync'd to phone
.........all playlists only use tracks rated >=3
.........thus sync'ing is 99.99% playlist update - no tracks are sync'd, other than new purchases
Playlists: ~59 synced
..........most are auto-playlists
..........use attributes Rating, Last Played, Date recorded, Genre, Genre "contains", Path "contains"
..........many are nested, i.e. "Top AutoPlaylist" includes "Level 2 AutoPL #1" + "Level 2 AutoPL #2" etc.
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.8 2012-10-15

Post by Aff »

toyzrme wrote:FYI I got an error on an embedded quote
Please don't mix threads :wink: Fixed in the script "Import music stats from Songbird XML".
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

Aff, this is an amazing piece of work and I think we are so close to getting a solution although something is not quite right and I'm struggling to find out exactly what is not working.

After a lot of testing this weekend, I think I have found the issue - the first time songs are synced to the device, the ratings do not get imported. The way I found this was by syncing a small playlist of 'random' tracks and their playcounts never get updated as they are only on the device for a single sync.

When I then synced a single artist with 2 albums, the first time I imported stats PlayerPro didn't import any stats but the 2nd time I synced it did even though it didn't sync any more tracks. Is this because it uses the exported xml file from PlayerPro?

Any advice would be great

Thanks again on some brilliant work.
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by Aff »

Hi PhilDG

I'm a little bit confused by your description. What steps have you taken exactly?

Only the last MM auto-sync is relevant. Only those tracks are processed. ("Send to" is irrelevant).
I always auto-sync random tracks (with deletion of existing tracks from the device), but not that often. Directly after an auto-sync, then from time to time and before the next auto-sync I run SyncBackRatings to update the ratings in MM and stats in MM/PlayerPro.

If you follow the steps from the instructions in the first post it should work.

The import.xml is based on the last exported_*.xml. So yes, you have to export stats first from PlayerPro, then run SyncBackRatings, after that you can import them in PlayerPro.

Did you ever relocate your music on the device? This can result in duplicate items in the XML, where SyncBackRatings would only use the first item, but PlayerPro may use the second one, so it would never sync the stats.

PlayerPro relies on the Android media database to find the songs. Maybe it didn't scan the device properly after the first auto-sync?

If you'd like to clean up, you could:
  1. Delete all music from the device
  2. check the auto-sync settings (select the playlist or folder you'd like to auto-sync)
  3. auto-sync
  4. write down your settings in PlayerPro (or make screen shots)
  5. delete all data and cache of PlayerPro (Android Home, Settings, Apps, PlayerPro, Stop, Clear Data)
  6. delete the MediaStore data of Android (Android Home, Settings, Apps, ALL apps, Media Storage, Stop, Clear Data)
  7. manually restore the settings in PlayerPro
  8. make sure that PlayerPro uses the music file tags for ratings: Settings, Music library, Rating system, Media Monkey
  9. let the MediaStore/PlayerPro scan the music (PlayerPro, Settings, Music library, Refresh mediastore)
  10. do the export, SyncBackRatings and import again.
You could activate the debug log and send me a PM with it and the XML contents as well (if it was too big, I can give you an e-mail address).

Good luck!
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

Thanks for your reply. Looking back at the instructions, what I have done so far and what you have just said, I am thinking there are new steps I have to take:

When I connect my Android device (after exporting to XML on that device)

1. Sync Back ratings (to get the playcounts back into Android)
2. Sync
3. Re-run sync back ratings to generate the import.xml file on the device.

Is this correct or have I missed the point? I wasn't re-running the sync which I think was why my XML file was out of date.

I have found another issue with albums that have two songs of the same name both wanting to be updated. It doesn't happen very often and I have renamed the tracks in question for now.

Thanks again for your effort
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by Aff »

What exactly do you mean with "sync"?
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

By sync, I mean running Auto-Sync from Media Monkey to the Android Device
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by Aff »

Auto-sync is needed only in case, after the last auto-sync, you changed one of the following in MM and want it to be updated from MM to PlayerPro:
  • ratings
  • album, artist or title
  • album art
  • lyrics
  • playlists
And of course if you want to change/replace the tracks you want to have on the device.

PlayerPro reads ratings from the tags automatically (if rating system is set to MM).

If you need to do an auto-sync you should:
  1. export from PlayerPro
  2. SyncBackRatings -> MM is updated
  3. auto-sync
  4. export from PlayerPro -> export_*.xml is generated containing the new/changed songs
  5. SyncBackRatings -> import.xml is generated
  6. import in PlayerPro -> PlayerPro stats are updated according to MM
  7. enjoy music
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

Thanks for clarifying that - I tend to auto-sync at least once a week to keep playlists fresh.

I will be using PlayerPro this week so I will report back on how it's gone - the tests I've done seem to work fine but it's only a controlled test with only one play at a time.

Fingers crossed as this is so much better than exporting to itunes and syncing from there.
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

Aff,

Just to give you some feedback, this script seems to working fine so far this week. Now that I understand how it works I can see why some of the steps need to be performed in a certain order (note to self:read the instructions!!). What I wasn't doing was doing a sync-back ratings after syncing the phone to ensure the playcounts are transferred onto the phone.

Great work mate. Thanks again - this means I can dump iTunes - finally!!
Eezyville
Posts: 3
Joined: Sat Sep 15, 2012 9:13 am

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by Eezyville »

Dude you are awesome for this. Now all we need is something to spice it up a bit. I'm thinking autosync over wifi. I know some software can do this but I don't know how. I'll have to look into it once I figure out how to program for MediaMonkey and Android.
PhilDG
Posts: 146
Joined: Sun Dec 30, 2007 6:14 am
Contact:

Re: Sync back ratings & play counts (MSC) v1.8.1 2012-10-16

Post by PhilDG »

This is working brilliantly now except for a few albums that never seem to sync back properly.

I have now worked out why it's not working although it doesn't make much sense to me.

The album in question is One by One (Foo Fighters) and which for some reason when you try and sync back it changes it to One By One in the XML file and then can't find it.

Any ideas? When I change it to One By One in MediaMonkey it finds it fine and syncs.
Post Reply