Update Location of Files in Database 1.3 (2012-06-12) [MM2+]

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

Moderators: Peke, Gurus

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

Re: Update Location of Files in Database 1.3 (2012-02-26) [M

Post by ZvezdanD »

YoursTruly wrote:Hello - i am also having issues here, I have been reading the thread (thanks to LowLander) but I too am having issues. selecting the root folder is not working
I am not sure that understand why you are having the problems, but I think that I should remove from the script a possibility when user has selected file in the tracklist that the script automatically select its folder in the Old path combo box since it could be confusing and in many cases not desirable. So, I could leave only a possibility to select folder in the Media Tree panel and then the script should select that folder. Well, maybe not even that, maybe I just have to remove such possibilities and to force users to enter Old path without taking the selection from the main window automatically.

OK, I think that my previous example with one file was not sufficient. You see, you should not choose the last (rightmost) folder in the path from the Old path combo box, but the last folder which is different for two drives, i.e. you should specify the base paths. Here is the the new example with 3 files, let say that I had an old drive with:
c:\Documents & Settings\Zvezdan\My Documents\Music\Blues\Albert King\Born Under a Bad Sign\04- Oh, Pretty Woman.mp3
c:\Documents & Settings\Zvezdan\My Documents\Music\Reggae\Black Uhuru\Chill Out\02 - Darkness.mp3
c:\Documents & Settings\Zvezdan\My Documents\Music\Rock\Pink Floyd\Dark Side of the Moon\03 - Time.mp3

and let say that I have a new drive with next paths:
d:\Media\My Music\Blues\Albert King\Born Under a Bad Sign\04- Oh, Pretty Woman.mp3
d:\Media\My Music\Reggae\Black Uhuru\Chill Out\02 - Darkness.mp3
d:\Media\My Music\Rock\Pink Floyd\Dark Side of the Moon\03 - Time.mp3

So, I need to specify c:\Documents & Settings\Zvezdan\My Documents\Music\ for Old path and d:\Media\My Music\ for New path. I could do that by selecting that folder in the Media Tree panel before I open "Update Location ..." dialog box or I could specify it from the Old path dropdown list. I should not apply the add-on by specifying folders one by one, i.e. I should not specify c:\Documents & Settings\Zvezdan\My Documents\Music\Rock\Pink Floyd\Dark Side of the Moon\ for Old path first, then c:\Documents & Settings\Zvezdan\My Documents\Music\Blues\Albert King\Born Under a Bad Sign\, then c:\Documents & Settings\Zvezdan\My Documents\Music\Reggae\Black Uhuru\Chill Out\.

I repeat, you should select your old base path in the Old path combo box, not matter if it has auto-selected some of its child folders after opening the "Update ..." dialog box. In your case, I think that you should have selected ?:\MUSIC\, but not ?:\MUSIC\NEW\Judy Mowatt\Black Woman\.

If you still has a problem using this add-on even after this example, I suggest that you upload your MM.DB database file packed with Zip into some file server like Mediafire, so I could try to reproduce your problem by myself.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
YoursTruly
Posts: 8
Joined: Sat Sep 25, 2010 8:14 am

Re: Update Location of Files in Database 1.3 (2012-02-26) [M

Post by YoursTruly »

ZvezdanD wrote: repeat, you should select your old base path in the Old path combo box, not matter if it has auto-selected some of its child folders after opening the "Update ..." dialog box. In your case, I think that you should have selected ?:\MUSIC\, but not ?:\MUSIC\NEW\Judy Mowatt\Black Woman\.
ZvezdanD - MANY THANKS!!! this has worked and I can see why not previously - so forgive me and to all if you did not interpret as i did, but for anyone having the issue - I did NOT select a change in the OLD DEVICE drop down field previously, as i assumed the default would suffice as it APPEARED to be pointing to the error.

However you quote above; "?:\MUSIC\, but not ?:\MUSIC\NEW\Judy Mowatt\Black Woman\. " My interpretation WAS correct, as long as I had selected the DEVICE then ROOT correctly, all the remaining path would be correctly updated and sort itself out

it was as simple as this, and it worked
Image

SO THANKS SO MUCH!!! this truly is the BEST way in my opinion to change device - ive been doing it for a very long time the other way! NOT ANYMORE
LifeTheLiving
Posts: 24
Joined: Sat Jan 24, 2009 5:53 am

Re: Update Location of Files in Database 1.3 (2012-02-26) [M

Post by LifeTheLiving »

To You who have a big MediaMonkey library.

History:
I have 471,838 songs in my MM library, and it fills 1,5 GB. My hard disk crashed while migrating from 5 TB to 10 TB and all was lost. I have a backup of all the music files and got them back on the newly formatted hard disk. New Drive ID and earlier I have with success used the description to use SQLite to change the description of the hard disk. However for some reason it only took some of the files, while others were still grayed out. When I looked at properties some of the files referred to Z:\music others to something like [Music]:Music (or something like that).

Looked around and found this script.

MM 4.03.1476 / UpdateLocationOfFiles-1.3.1.mmip/Windows 7 fully updated. MM Library located C:\Users\Me\AppData\Roaming\MediaMonkey\MM.DB

It worked … however:
I followed the instructions. But MM crashed.

I started the script again, after awhile I again got the message “The Application Seems to Be Frozen”, I press OK, Then the message “The Message Was Sent Successfully”, I press OK.

I had been monitoring the above library: C:\Users\Me\AppData\Roaming\MediaMonkey\MM.DB. MM.DB got updated, also a file MM.DB-Journal was updating.

When I got the above error messages the updating of MM.DB and MM.DB-Journal stopped. But I noticed, once I had pressed OK to the two above messages, the Updating continued. MM was displaying [Not Responding] during most of this time.

I got the above error messages about 10 times and every time I pressed OK and the updating apparently continued.

After about 1 hour and regularly pressing OK to the above error messages MM suddenly stopped displaying [Not Responding] and the script said it had updated the library. And It had.

This is a lifesaver. I have donated :roll:

Regards Leif.

Update: the resulting MM.DB file was 1,8 GB, but after maintainance of the library it was back to 1,5 GB.
Bod

Re: Update Location of Files in Database 1.3 (2012-02-26) [M

Post by Bod »

It looks like the script isn't working for me. My music is on an external hard drive. I rebooted my laptop and replaced the new MM.db file with the old one that I had backed up. The old path seems to be the same as the new one (F:\music). When I run the script, it says that the paths are identical. My music is all grayed out. What should I do?

One thing that I noticed is that the MM database file used to be in this folder:
C:\Users\Bod\AppData\Local\Mediamonkey\

After rebooting my laptop, I found the new MM Database file in this folder (I then replaced it with the old MM.DB file):
C:\Users\Bod\AppData\Roaming\Mediamonkey\

Could it be causing the problem?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Update Location of Files in Database 1.3 (2012-02-26) [M

Post by ZvezdanD »

Bod wrote:It looks like the script isn't working for me. ... The old path seems to be the same as the new one (F:\music). When I run the script, it says that the paths are identical.
Thanks for the report. There is the new release, v1.3.2 - 2012-06-01:
* Fixed: update when the old and new paths are same with the same drive letters, but with different drive serial numbers.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
bcb

Re: Update Location of Files in Database 1.3 (2012-06-01) [M

Post by bcb »

Excellent script! This is exactly what I was looking for. Thanks. :)

I have encountered one glitch: some of the music in my db use unc paths, and these paths show up correctly in the "old path" dropdown prefixed with the letter A. For example, if I have a file with the path "\\mycomp\music\song.mp3", the dropdown shows up with these options: "A\\", "A\\mycomp\\", and "A\\mycomp\music". If I select "A\\", the "old location" file counts include all of my (missing) media files. None of the other options find any matches. Trying to update paths using any of those locations, even "A\\", will complete instantly and make no changes.

I'm using v1.3.2 of your script and MM gold v4.0.2.1462.

Any ideas?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Update Location of Files in Database 1.3 (2012-06-01) [M

Post by ZvezdanD »

bcb wrote:I have encountered one glitch: some of the music in my db use unc paths, and these paths show up correctly in the "old path" dropdown prefixed with the letter A.
I don't have such problem with UNC paths in my database. Could you upload your MM.db file packed with Zip to some file server like Mediafire?
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
bcb

Re: Update Location of Files in Database 1.3 (2012-06-01) [M

Post by bcb »

ZvezdanD wrote:
bcb wrote:I have encountered one glitch: some of the music in my db use unc paths, and these paths show up correctly in the "old path" dropdown prefixed with the letter A.
I don't have such problem with UNC paths in my database. Could you upload your MM.db file packed with Zip to some file server like Mediafire?
Sure, here it is. I shrunk it to ~500k by deleting almost everything from the library. I still see the same behavior from the script on this trimmed-down version: http://www.mediafire.com/file/dnpen1342gage16/MM.zip
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Update Location of Files in Database 1.3 (2012-06-01) [M

Post by ZvezdanD »

bcb wrote:I still see the same behavior from the script on this trimmed-down version
Thanks for the report and database. You have a faulty database and maybe you should try with the built-in "Optimize database" option. Anyway, there is the new release of this add-on with the workaround for the mentioned problem: v1.3.3 - 2012-06-12,
* Fixed: display of old UNC paths on some broken/faulty 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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Guest

Re: Update Location of Files in Database 1.3 (2012-06-01) [M

Post by Guest »

ZvezdanD wrote:Thanks for the report and database. You have a faulty database and maybe you should try with the built-in "Optimize database" option. Anyway, there is the new release of this add-on with the workaround for the mentioned problem: v1.3.3 - 2012-06-12,
* Fixed: display of old UNC paths on some broken/faulty databases.
Data posted at night, new version with workaround available first thing in the morning, and now I have all of my music back. That's the best tech support ever! :D

I've upgraded that database a a few times from older versions of MM. I'm not terribly surprised that it got a bit screwed up in the process...
MMuser2011
Posts: 1308
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

Re: Update Location of Files in Database 1.3 (2012-06-12) [M

Post by MMuser2011 »

Your script saved me several hours of waiting!
(I tried to adjust some path-structures for my tracks and then the MM4-"moved/missing files". This would be the same as re-read my entire collection...)
Thank you very much for sharing your script!

Small addition: Do you have any idea, why my path "Z" doesn't appears in the correct sort order?
Image
That's not a big problem, just a litte bit confusing :wink:
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Update Location of Files in Database 1.3 (2012-06-12) [M

Post by ZvezdanD »

MMuser2011 wrote:Do you have any idea, why my path "Z" doesn't appears in the correct sort order?
I don't have any idea, but I noticed that as well. It is some bug of the program itself and I cannot do anything about 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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Lowlander
Posts: 56465
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Update Location of Files in Database 1.3 (2012-06-12) [M

Post by Lowlander »

That's an old bug that hasn't been fixed. MediaMonkey has used it's own sort for drives for years: http://www.ventismedia.com/mantis/view.php?id=6078
Gary Pleasanton

Re: Update Location of Files in Database 1.3 (2012-06-12) [M

Post by Gary Pleasanton »

How do you remove this from your computer afterwards?
Lowlander
Posts: 56465
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Update Location of Files in Database 1.3 (2012-06-12) [M

Post by Lowlander »

Most addons can be removed from Tools > Extensions.
Post Reply