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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Postby ZvezdanD » Sat Oct 11, 2014 7:29 am

chrisjj wrote:I don't see any mention there of a bug. If you have filed this bug as a Mantis entry, please do show that entry.

I have described a bug in the report. As I said, "if program refuses to display the Properties dialog box for some existing drive, then it is a bug." Not to mention that the SDB.MainTracksWindow.Refresh has the bug at first place since it doesn't really refresh the tracklist, because of which I was forced to use that dirty hack that I mentioned in the report simulating the key presses with the SendKeys to open the Properties dialog box.

No, I don't want to report those bugs as new entries in the Mantis just for you to be satisfied. Actually, I am done with reporting bugs to MM developers. I have 150+ bugs and suggestions in the Mantis that are not even assigned to some MM developer. I don't want to waste my time anymore on something that will not be even read by them.

And since when did you become devil's advocate for MM? Are you paid by Ventis Media?

chrisjj wrote:
ZvezdanD wrote:You are complaining why the script is applying "only on the path of the first track" "rather than on the entire library". That sounds like suggestion to me.

You're mistaken. I described the current behaviour. That is not a complaint. That is not a suggestion.

You are mistaken. Your first sentence is a complain why my script has behavior as it has and immediately after that starting with the "rather" you suggest how it should behave. If that is not suggestion then I don't know what is it.

chrisjj wrote:Your first part did not work on a normal library structure and your second added nothing to the workaround I had already posted: "Workaround: if there is one drive, first select the drive: http://i.imgur.com/Ee81RIS.png".

That is not the workaround, but the intended behavior of the script. The add-on's "Usage" section explicitly says: "select missing drive/folder in the Location or My Computer branch of the tree panel and choose "Update Location of Files in Database..." from the Tools | Scripts menu". It is your fault that you tried something else. Did you read in the "Usage" section that I said: "Select the Entire Library node in the tree panel"?

chrisjj wrote:My suggested fix would make the workaround unnecessary.

No, your suggested fix would not make anything unnecessary, it would cover just one specific situation. What if user has two or more drives? What if user has selected some another node than Entire Library, e.g. Files to Edit or Magic Nodes or Now Playing? Which path should be automatically entered in the Old path combo box in such case?

As I said in the "Usage" section, you could select some node from the Location or My Computer branches. The reason is very simple - only such nodes could return the unique Path property: http://www.mediamonkey.com/wiki/index.p ... Node::Path. The Entire Library node returns empty Path.

chrisjj wrote:It would certainly meet my suggestion #2. Provided:

1) When rule #1 is matched, execution of the rule list doesn't stop. This is because the case of my suggestion #2 (select Entire Library, run script http://i.imgur.com/CjG1O7G.png ) matches rules #1 and #2 and only rule #2 will give the desired outcome.
2) Rule #2 "contains some missing drive/path" means "contains some missing tracks". This is to handle the case where the drive is present but the tracks are missing.
3) Rule #2 uses the shortest leading drive/path spec segment that is common to the tracks meeting the condition. This is to handle the default MM library structure where tracks are in album folders, so that tracks C:\My Music\my first album\artist\title.wma and C:\My Music\my second album\artist\title.wma with give Old Path C:\My Music\.

Sorry, but no again. None of your suggestions would be desired. What if user has selected the Entire Library node then he/she has selected some missing file from the tracklist, e.g. if he/she wants to update just files from the same folder? If I implement your suggestion he/she would get Old Path combo box filled not with that folder, but with the root of the same drive (assuming that he/she has only one drive in the Library).

And no, I don't want to check if some existing drive has some missing files just to be able to automatically select path in the Old Path combo box. Such operation would be time consuming causing the slow opening of the dialog box which I am trying to avoid. I think that even your third suggestion with common path segments would be time consuming.
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3017
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby chrisjj » Sat Oct 11, 2014 9:27 am

ZvezdanD wrote:I have described a bug in the report. As I said, "if program refuses to display the Properties dialog box for some existing drive, then it is a bug."

Well, you can be fairly sure that will not be taken as a bug report, I think.

ZvezdanD wrote:Not to mention that the SDB.MainTracksWindow.Refresh has the bug at first place since it doesn't really refresh the tracklist

I agree that's lamentable, but you don't ID that as a bug and, given the lack of definition of that method, I think it would not be safe to ID it as a bug.

ZvezdanD wrote:No, I don't want to report those bugs as new entries in the Mantis just for you to be satisfied.

I did not suggest it to satisfy me. I suggested it to satisfy your presumed deisre to get the bug (if any) fixed.

ZvezdanD wrote:And since when did you become devil's advocate for MM? Are you paid by Ventis Media?

Ho ho :)

ZvezdanD wrote:Your first sentence is a complain why my script has behavior as it has

No. It is simply a description of the current behaviour.

ZvezdanD wrote:and immediately after that starting with the "rather" you suggest how it should behave. If that is not suggestion then I don't know what is it.


What is a suggestion ZvezdanD is the bit starting with "I suggest..." .

ZvezdanD wrote:
chrisjj wrote:Your first part did not work on a normal library structure and your second added nothing to the workaround I had already posted: "Workaround: if there is one drive, first select the drive: http://i.imgur.com/Ee81RIS.png".

That is not the workaround, but the intended behavior of the script.

It is a workaround for "the script operates only on the path of the first track in the entire library track list".

ZvezdanD wrote:The add-on's "Usage" section explicitly says: "select missing drive/folder in the Location or My Computer branch of the tree panel and choose "Update Location of Files in Database..."

Yup. Hence my suggestion for improvement.

ZvezdanD wrote:No, your suggested fix would not make anything unnecessary, it would cover just one specific situation.


It makes "select missing drive/folder in the Location or My Computer branch of the tree panel" unnecessarily the situation of the default MM library filing. I think that applies to most users.

ZvezdanD wrote:What if user has two or more drives? What if user has selected some another node than Entire Library, e.g. Files to Edit or Magic Nodes or Now Playing? Which path should be automatically entered in the Old path combo box in such case?

I think your current solution is fine for that.

ZvezdanD wrote:As I said in the "Usage" section, you could select some node from the Location or My Computer branches.

Yup. That's where I'm suggesting an improvement can be made.

ZvezdanD wrote:The reason is very simple - only such nodes could return the unique Path property: http://www.mediamonkey.com/wiki/index.p ... Node::Path. The Entire Library node returns empty Path.

Well, you've already shown you're clever enough to code a solution to that! :)

chrisjj wrote:It would certainly meet my suggestion #2. Provided:

1) When rule #1 is matched, execution of the rule list doesn't stop. This is because the case of my suggestion #2 (select Entire Library, run script http://i.imgur.com/CjG1O7G.png ) matches rules #1 and #2 and only rule #2 will give the desired outcome.
2) Rule #2 "contains some missing drive/path" means "contains some missing tracks". This is to handle the case where the drive is present but the tracks are missing.
3) Rule #2 uses the shortest leading drive/path spec segment that is common to the tracks meeting the condition. This is to handle the default MM library structure where tracks are in album folders, so that tracks C:\My Music\my first album\artist\title.wma and C:\My Music\my second album\artist\title.wma with give Old Path C:\My Music\.


Sorry, correction: Rule #2 uses the longest leading drive/path spec segment that is common to the tracks meeting the condition.

As per the example.
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby chrisjj » Sat Nov 01, 2014 11:23 am

Bug report: V1.42 with old path on SUBST drive can update to wrong drive

On MM 1708, Win 7, with native volume S: and SUBST R: on S:

1 Make this update: http://i.imgur.com/mzMWFT2.png
2 Get confirmation that new path is S:\My Music\My ZENtango package folder\ http://i.imgur.com/qQGJxdK.png
3 Click OK

Expected: new path is S:\My Music\My ZENtango package folder\
Observed: new path is R:\My Music\My ZENtango package folder\ http://i.imgur.com/oNutKtY.png. I.e. wrong drive
Confirmed by script: http://i.imgur.com/7stq8c6.png

This fault does not occur with new path D:\My Music\My ZENtango package folder\ - http://i.imgur.com/VhkzvHp.png. D: is a native drive, not a SUBST.
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby chrisjj » Sat Nov 01, 2014 11:25 am

There's a text error on V1.42: at http://i.imgur.com/QLceZLC.png , "exists" should be "exist".
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby ZvezdanD » Sat Nov 01, 2014 12:56 pm

Thanks for the report.
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3017
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby chrisjj » Sat Nov 01, 2014 8:19 pm

Thanks for the fix to the fail with SUBST on 1.4.3:

Update: http://i.imgur.com/CMs8owM.png , http://i.imgur.com/1zIez9R.png
Result: http://i.imgur.com/PwT9KmZ.png
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby chrisjj » Sun Nov 02, 2014 8:53 pm

V1.43 on MM 1708 can fail to refresh the track list e.g. after Update: http://i.imgur.com/TMHNrng.png . After relaunch: http://i.imgur.com/UCmGYrP.png
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby ZvezdanD » Mon Nov 03, 2014 4:13 am

chrisjj wrote:V1.43 on MM 1708 can fail to refresh the track list e.g. after Update: http://i.imgur.com/TMHNrng.png . After relaunch: http://i.imgur.com/UCmGYrP.png

We already discussed about this a lot. As I said, this is the problem of the program itself and I cannot do anything about it (http://www.ventismedia.com/mantis/view.php?id=9138). I am using some dirty hacks to overcome this, but obviously it is not working always. Maybe it could help if you write to MM developers.
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3017
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby chrisjj » Mon Nov 03, 2014 5:57 am

OK, thanks.
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby Fredo » Wed Feb 18, 2015 8:29 am

I have a basic usage question, please.

I copied my MM database and music track library from one computer to another. The drive letter and paths are identical. However, tracks are grayed out. When I Add/Rescan tracks, I get duplicate track listings in MM.

Instructions for this script say: "Select some missing file with the old drive/path...". It is not clear whether this script would affect only those tracks or all track files in the database. How would I update the location for all track files in the database (without physically moving tracks)?

Also, is the music track drive path and serial number coded in only one place in the database, or is it encoded for each and every track?

Thank you for your help.

Fred
Fredo
 
Posts: 33
Joined: Fri Dec 26, 2008 12:03 pm

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

Postby ZvezdanD » Sat Feb 21, 2015 3:52 am

Selecting of missing file in the main filelist is not mandatory for work of this script, it is implemented just to auto-fill initially the Old Path combo box when you open the Update Location dialog box. If you read the rest of the Usage section from the download page you would read "The old drive/path could be set in the mentioned dialog box as well." So, if you wrongly select some file in the main filelist and open the Update Location dialog box, you always could change that selection in the Old Path combo box by yourself.

I have explained in this thread which files are actually updated, but here it is again. With the Old Path combo box you are choosing the base folder for updating. This means that you would get updated all files from that folder and its sub(-sub)-folders recursively. This also means that you should select the root of the drive in the Old Path combo box if you want to update all files from that disk. If you have the database referencing files stored on several drives, then you could update location of such files only for one drive at time. The Old location label shows how many files would be actually updated with the selected Old path.

It seems that my decision to implement the initial auto-fill of the Old Path combo box based on the selected file in the main filelist is a reason for a lot of user confusions and I think that I will remove such option in the next version of the script.
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3017
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby chrisjj » Sat Feb 21, 2015 5:22 am

ZvezdanD wrote:It seems that my decision to implement the initial auto-fill of the Old Path combo box based on the selected file in the main filelist is a reason for a lot of user confusions and I think that I will remove such option in the next version of the script.


Good to hear.
Chris
chrisjj
 
Posts: 4926
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Postby nev » Mon Jun 22, 2015 6:15 am

Getting a 404 on the link to the script ?
nev
 

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

Postby JoePublic » Tue Aug 25, 2015 6:34 pm

This is just a story of reassurance for anyone wanting to use ZvezdanD's script.

I acquired a new HDD and added it to my desktop PC, keeping the old one. I copied all my media folders to the new drive: 2 folders (and lots of sub folders) in the root directory. (That took quite awhile.) I reassigned my drive letters so that the old drive was D: and became W:, and the new drive was I: and became D:. (The new drive is taking place of the old, but I'm still using the old as a backup, so I did not delete the music files off of the old drive.)

I made a copy of my MM.DB file just in case. I downloaded and installed the script. I opened MMW 4.1.7. As expected, MM found all my music on the old drive, showing the new "W:" path. I selected a song and ran the script. It correctly displayed my old base path as "W:\" and spent 7 minutes scanning my music files. (I have 240,000 of them, 1654GB worth.) I filled in the new base path ("D:\"). It took a few minutes to show me the stats on the files on the new drive (the same number, happily). I waited until that was finished. I did NOT check either of the 2 check boxes. I pressed the Update button, and 0.53 seconds later (!), the MM database was updated. I closed and reopened MM, and everything looks peachy.

I took a look at the old MM.DB that I made a copy of and the newly updated live MM.DB: identical in size (618,758,144 bytes), which kind of surprises me a little. I thought there would be SOME difference in size. Now, after optimizing the library (which takes about a minute and a half... love that SSD C: drive), the MM.DB shrank slightly to 618,727,424 bytes, a difference of 28,720 bytes.

Thanks for the great script.
JoePublic
 
Posts: 85
Joined: Tue May 19, 2009 11:43 am
Location: Fenton, MO

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

Postby shanemorales » Wed Sep 09, 2015 6:23 pm

Does this actually work? I can't even get it started. There is nothing to select in the old drive/path drop down boxes. Weak.
shanemorales
 

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 16 guests