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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

76firefly
Posts: 50
Joined: Fri Nov 12, 2010 8:10 pm

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by 76firefly » Sat Mar 05, 2011 10:31 am

Probably a dumb question, but will this work on MM4's new DB structures?

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

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by ZvezdanD » Sat Mar 05, 2011 7:45 pm

76firefly wrote:will this work on MM4's new DB structures?
I didn't test it with MM4 yet, but I suppose it would work fine. AFAIK, the database part which is affected by this add-on is not changed in MM4.
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

Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Mizery_Made » Thu Jun 30, 2011 12:21 pm

ZvezdanD wrote:Usage:
Choose the Tools / Scripts / Restore Play History/Date Added/Playlists option, specify backup database file from which you want to restore data, turn on the Clear Played table... option if you want to restore data or turn it off if you want to merge data and wait for the script to finish. It is rather slow (~20 seconds).
I'm currently trying to restore played data and date added data for three albums which seem to have been lost in my "main database" between computer shuffles. I re-imported them into my main/live/active database, set a filter to only show tracks added today (as the three albums in question are the only new files) and then proceeded to try and use this script.

Pointed the script to the Database which contains the played information and such for the albums, set it to restore played data (without clearing) and to set the Date Added to the earlier date. It's only like 37 tracks (the overall databases are closer to 11,000+). Run the operation... and get a locked up MediaMonkey for at least a good half hour, if not longer. The memory usage of the process is running around 104,000kb and the CPU usage is running around 70-90. Got any ideas why the script may be choking?

I wouldn't think it would be a result of the two 11,000+ track databases, as I've previously used this script to migrate information between and old and fresh database with around that many tracks and it would a lot smoother than this. Is it perhaps because of the Filtering? My previous usage of this script was on the entire databases, not a subset of files. That and the fact I'm not clearing the playhistory table are the only two differences I can think of between this "failed" attempt and previous successful runs.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by nynaevelan » Thu Jun 30, 2011 12:31 pm

I restored my played table, playlists and added dates on a cleared db last week, it took less than 10-15 minutes on my @18,000 tracks. This was just on my music tracks, I have yet to try it on any videos. I also selected all the options to clear the tables.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Mizery_Made » Thu Jun 30, 2011 1:09 pm

There appears to be an issue with this script and filters with the criteria of "Date Added < 1 (days ago)" (aka, added today) as the program remained hung for a good hour or hour and a half before I finally just killed it. Brought the program back up and figured I would try something a little different. Figured I would try to run the process again, but only restore the Date Added (and not play history) however in doing so I would "lose" the albums as they would no longer match the filter I was using (to then attempt a play history restore, to see if one or the other process was the culprit of the hang). Thus, I created a second filter, this one instead was just "Album equals (the three albums checked)." Ran the process with this new filter (not sure what prompted me to do so) and even with play history and date added both checked...

"Restore finished for 3.04 seconds."

Might be something you want to look into. By the way, given Nyn's recent usage of this with MM4 and comment of videos I thought I should specify that this was in MM3.

PS -- "Restore finished for..." is grammatically incorrect, it should be "Restore finished in..."

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by nynaevelan » Thu Jun 30, 2011 1:16 pm

I just ran a test on a mm4 restore and it took 4 minutes for the database to be read in and 177.02 seconds to restore the data, but you cannot clear the played table, it gave me this error:

Image
restore Playhistory1 by nynaevelan1, on Flickr

This was on a full db restore without any filters.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Mizery_Made » Thu Jun 30, 2011 1:31 pm

That one is likely because the Offset column hasn't been accounted for in the script yet.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by nynaevelan » Thu Jun 30, 2011 1:38 pm

That's what I figured.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

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

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by ZvezdanD » Thu Jun 30, 2011 3:38 pm

Thanks to both for the reports. I suppose I could fix that error with the Played table relatively easy, but I don't know why is such a long execution time with the filters. Mizery_Made, could you send me your databases, the old and new ones, so I could try to reproduce your 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

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Onweerwolf » Thu Jul 07, 2011 8:30 am

So, tried this script and had some problems when trying it in MM3

First, it never formally finished. I ran it, it said restoring in the taskbar and then my windows taskmanager (xp) reported two instances of MM not responding. I left it running all night but nothing changed. Then I killed MM in taskmanager and restarted.

At first look it seems everything has been restored. I couldn't find anything that has not been restored but I have not had the time to take a really close look yet.

Second problem: some of my static playlists aren't fully correct. I have a number of playlists that should contain exactly 2000 tracks. A few lost 1 or 2 tracks and a few gained 2. I've noticed in one instance that a single track was added to the start of such a playlist twice. Interesting thing here is that this track is one of the 140 tracks that gave me a problem here: http://www.mediamonkey.com/forum/viewto ... =6&t=58945

I'm not expecting a solution here or anything, this is just a report that might be interesting.

ZvezdanD, if you're interested in investigating i'm happy to send you a database file, just let me know.

I have one question though, before I used the script I imported all of my tracks into the new library. Is this actually necessary?
Image

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

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by ZvezdanD » Thu Jul 07, 2011 9:07 am

Onweerwolf wrote:First, it never formally finished. I ran it, it said restoring in the taskbar and then my windows taskmanager (xp) reported two instances of MM not responding.
How Task manager could report if some program is not responding? Did MM use 100% CPU or was it low? If it was low CPU usage, you got the message box saying that restoring is finished, but sometimes that dialog box goes to the back of the main window. That is the problem with the program itself, many times reported I think since MM2, but they cannot resolve that bug for some reason. I think it is especially manifesting with the skinned version of the program.
Onweerwolf wrote:Second problem: some of my static playlists aren't fully correct. ... if you're interested in investigating i'm happy to send you a database file, just let me know.
Thanks for the report. Yes, it would be nice if you upload your old (backup) and the new (current, before restoring) databases archived in .zip or .rar file to some public server as Mediafire or Megaupload or whatever you like and send me its link to PM.
Onweerwolf wrote:I have one question though, before I used the script I imported all of my tracks into the new library. Is this actually necessary?
Yes, it is necessary. If you don't have the tracks in the current database then the add-on cannot find the matching in tracks between the old and new databases.
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

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Onweerwolf » Thu Jul 07, 2011 9:20 am

ZvezdanD wrote:
Onweerwolf wrote:First, it never formally finished. I ran it, it said restoring in the taskbar and then my windows taskmanager (xp) reported two instances of MM not responding.
How Task manager could report if some program is not responding?
This is what I mean:

Image

(this is just an example I googled but imagine mediamonkey.exe instead of that first word.doc to learn what I meant)
Did MM use 100% CPU or was it low?
100% usage all the time.
If it was low CPU usage, you got the message box saying that restoring is finished, but sometimes that dialog box goes to the back of the main window. That is the problem with the program itself, many times reported I think since MM2, but they cannot resolve that bug for some reason. I think it is especially manifesting with the skinned version of the program.
I'm positive I would have noticed that in any case if that was what happened. If this message box appears (whether hidden or not) does it still say 'restoring' in the taskbar until you click the message box away?
Onweerwolf wrote:Second problem: some of my static playlists aren't fully correct. ... if you're interested in investigating i'm happy to send you a database file, just let me know.
Thanks for the report. Yes, it would be nice if you upload your old (backup) and the new (current, before restoring) databases archived in .zip or .rar file to some public server as Mediafire or Megaupload or whatever you like and send me its link to PM.
Will do but it will take some time which I don't really have right now. Gotta make a new DB with all the tracks scanned and that takes 45 minutes or so. :-? Expect it maybe this weekend or next week.
Onweerwolf wrote:I have one question though, before I used the script I imported all of my tracks into the new library. Is this actually necessary?
Yes, it is necessary. If you don't have the tracks in the current database then the add-on cannot find the matching in tracks between the old and new databases.
Understood!
Image

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

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by ZvezdanD » Thu Jul 07, 2011 9:34 am

Onweerwolf wrote:This is what I mean:
OK, now I see.
Onweerwolf wrote:If this message box appears (whether hidden or not) does it still say 'restoring' in the taskbar until you click the message box away?
I am not sure that understand. Do you mean the "status bar" instead of the "taskbar"? "Restoring..." is displayed in the status bar until the restoring is finished, but before the message box appears.

I suppose that I would reproduce that bug as well when you send me your databases.
Onweerwolf wrote:Expect it maybe this weekend or next week.
OK, I am looking forward to it.
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

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Onweerwolf » Thu Jul 07, 2011 10:08 am

ZvezdanD wrote:I am not sure that understand. Do you mean the "status bar" instead of the "taskbar"? "Restoring..." is displayed in the status bar until the restoring is finished, but before the message box appears.
Yep sorry. I meant the status bar.

It's just says 'restoring' up until i manually kill mediamonkey.exe.
Image

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Restore PlayHistory/DateAdded/Playlists 1.4 (2010-09-03

Post by Onweerwolf » Thu Jul 07, 2011 5:26 pm

In any case, I've upgraded the first database I made to MM4 and the files that were giving me problems have been fixed using this script.. :D :D :D
Image

Post Reply