Page 5 of 17

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

Posted: Thu Apr 22, 2010 2:51 pm
by Lowlander
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.

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

Posted: Thu Apr 22, 2010 3:05 pm
by ZvezdanD
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?

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

Posted: Sun Apr 25, 2010 1:34 pm
by MeMeMe
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.

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

Posted: Wed May 19, 2010 2:03 am
by richiefinger
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

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

Posted: Wed May 19, 2010 2:47 am
by ZvezdanD
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...

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

Posted: Wed May 19, 2010 3:22 am
by richiefinger
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.

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

Posted: Thu May 20, 2010 2:10 am
by ZvezdanD
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.

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

Posted: Thu May 20, 2010 3:05 am
by richiefinger
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.

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

Posted: Thu May 20, 2010 4:25 am
by ZvezdanD
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.

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

Posted: Mon May 24, 2010 3:02 am
by richiefinger
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.

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

Posted: Mon May 24, 2010 9:19 am
by ZvezdanD
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.

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

Posted: Mon Jul 26, 2010 12:29 pm
by martialartsguy
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!

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

Posted: Wed Aug 04, 2010 9:03 pm
by martialartsguy
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.

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

Posted: Thu Aug 05, 2010 2:13 am
by ZvezdanD
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.

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

Posted: Thu Aug 05, 2010 7:03 pm
by martialartsguy
No worries. Maybe more people will see how cool this script is (especially when resolving database issues) and get behind this! :wink: