Restore/Synchronize Database 3.1.2 (2013-08-31) [MM3+]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Lowlander
Posts: 45856
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by Lowlander » Thu Apr 22, 2010 2:51 pm

The script doesn't throw the error, it's MediaMonkey debugs version build in error messages that pop up. I do assume that the script is causing these error messages (but it always could be something else) as I'm only running the script at the moment they appear.
Lowlander (MediaMonkey user since 2003)

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by ZvezdanD » Thu Apr 22, 2010 3:05 pm

Lowlander wrote:The script doesn't throw the error, it's MediaMonkey debugs version build in error messages that pop up.
How that error message looks exactly? Could you send me your databases to try to reproduce the problem?
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by MeMeMe » Sun Apr 25, 2010 1:34 pm

I'm trying to install this, but it gives me a popup saying "product Installation error" and doesn't install.

Edit: I'm on Win7 64bit, and only have the MagicNodes and LastFM scrobbler installed so far.

Edit2: never mind. I had to run mediamonkey as an administrator first, then it installed.

richiefinger
Posts: 154
Joined: Sat Oct 24, 2009 7:58 am

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by richiefinger » Wed May 19, 2010 2:03 am

Hi. Script sounds great. Would it be possible to use it for something slightly different?
Somehow all my "disc#" field info has disappeared.
Would it be possible to adapt this script to add/merge "disc#" field information from an old DB to the current DB.
I do not want to add any other information.
Cheers

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by ZvezdanD » Wed May 19, 2010 2:47 am

richiefinger wrote:Would it be possible to adapt this script to add/merge "disc#" field information from an old DB to the current DB.
Yes, it is possible. I am already thinking to add a possibility for users to choose which field(s) they want to restore beside of the Date Added, but I cannot say when it will be finished. In the meantime, you could try one fast and dirty hack: open c:\Program Files\MediaMonkey\Scripts\RestorePlayHistory.vbs file into Notepad and choose Edit/Replace/Find what: DateAdded, Replace with: DiscNumber, save file and restart MM program. It is recommended to make a backup of the current database before you start this add-on and choose Restore option.

However, it is not possible to merge fields from the Songs table (DateAdded or DiscNumber), you could only restore them - all current values entered in that field will be overwritten with backup values if you choose that option. Only Play history and Playlists could be merged (for now, at least). Maybe I could add one more option "Restore field(s) from Songs table only if current value is empty" with the next version...
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

richiefinger
Posts: 154
Joined: Sat Oct 24, 2009 7:58 am

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by richiefinger » Wed May 19, 2010 3:22 am

Thats great. I'll try that. I only want to restore rather than merge so that's fine.
I'll let you know how it goes.

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by ZvezdanD » Thu May 20, 2010 2:10 am

richiefinger wrote:I only want to restore rather than merge so that's fine.
I forgot to mention, this add-on updates only database file, but not tags in audio files. If you want to restore Disc Number in tags as well, you should choose Tools/Advanced Tag Management/Synchronize Tags after the execution of this add-on.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

richiefinger
Posts: 154
Joined: Sat Oct 24, 2009 7:58 am

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by richiefinger » Thu May 20, 2010 3:05 am

I tried the hacked script.
Some of the disc numbers came back some did not?
Only 75% of the database matched up, so that is probably why.
So I am in a better position than when I started. Thanks:)
I did note that when the disc numbers came back they appeared as 1.0 rather than 1. Not a problem because its easily changed.
I did not use the sync tags as you mention above. I will try this later and see what happens.

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by ZvezdanD » Thu May 20, 2010 4:25 am

richiefinger wrote:Some of the disc numbers came back some did not?
Only 75% of the database matched up, so that is probably why.
Exactly, only matched tracks could be updated. You have changed location and artist/album tags of those 25% tracks after making backup.
richiefinger wrote:I did note that when the disc numbers came back they appeared as 1.0 rather than 1.
Yeah, that is because DateAdded is treated as decimal value. Open script file into Notepad again, go to 496 line and write BackupAdded INTEGER instead of BackupAdded REAL. However, If you have some additional string beside of numbers, e.g. if you have tracks from vinyl/cassettes with disc numbers as A1, B1... then you should write BackupAdded TEXT instead.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

richiefinger
Posts: 154
Joined: Sat Oct 24, 2009 7:58 am

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by richiefinger » Mon May 24, 2010 3:02 am

I used the sync tags command but it didn't gain any extra matches.
Must have done it already with it a restart etc.
Much thanks though for getting back the ones that it did.

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)MM3]

Post by ZvezdanD » Mon May 24, 2010 9:19 am

richiefinger wrote:I used the sync tags command but it didn't gain any extra matches.
Sorry, but I think that you didn't understand. I didn't say that you would get any extra matches using Synchronize Tags command. I said that this add-on updates only database file, but not tags in audio files. If you open some audio file in another program you would see old value for Disc Number, not restored value from database. You need mentioned command to updates tags in audio files to match those values in database.

You cannot get any additional matches because you changed location (paths) and artist/title tags for those 25% unmatched tracks after you made the last backup. If you want to use this add-on to restore Disc Number for those tracks, the only solution is to revert back location or artist/title/album tags that you changed, but it is pointless because it is easier to enter manually Disc Number for those tracks. My suggestion for the future is to generate checksums for audio files by expanding of Files To Edit / Duplicate Content node before you make a backup - after that this add-on would find matched tracks even if you change location and/or tags.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

martialartsguy
Posts: 264
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)

Post by martialartsguy » Mon Jul 26, 2010 12:29 pm

ZvezdanD,

Just wanted to reiterate my love for this script. I was recently having huge problems with my database, so i did a fresh install (keeping a recent backup database in a separate folder). This script made my reconstruction so easy and painless! Label me totally impressed. I have a new favorite must-have script with this one! :D

Cheers!
MM 4.1.10.1778

martialartsguy
Posts: 264
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)

Post by martialartsguy » Wed Aug 04, 2010 9:03 pm

Hey there, quick question (I hope!).

I'm trying to restore just a few tracks, but I can't seem to get the "Restore data for filtered tracks only" selection to be clickable. It's greyed out. Is there a setting somewhere to enable this?

[EDIT] I figured it out. You actually have to create a Filter. Is there a way instead to just select tracks and restore those? That might be a nice addition to this script.
MM 4.1.10.1778

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)

Post by ZvezdanD » Thu Aug 05, 2010 2:13 am

martialartsguy wrote:Is there a way instead to just select tracks and restore those? That might be a nice addition to this script.
Yeah, I already though about that, but nobody asked for it and in general this script is not widely accepted, so I am not sure that I want further to spend my time for something which would be used by one person only. Sorry.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

martialartsguy
Posts: 264
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2009-11-16)

Post by martialartsguy » Thu Aug 05, 2010 7:03 pm

No worries. Maybe more people will see how cool this script is (especially when resolving database issues) and get behind this! :wink:
MM 4.1.10.1778

Post Reply