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

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

版主: Peke, Gurus

Genji
帖子: 2
注册时间: 周三 9月 10, 2014 11:39 am

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

帖子 由 Genji »

just copied archive from sysem to data drive, updated usign this tool
everything worked perfectly ^^

180Gb more space *Yay*
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

damixx 写了: To run the script, should I launch the MM software on the old or new drive?
Should the script be ran on the old or new drive?
New, and new.
Chris
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

Thanks again for this very useful script.

Some suggestions for improvement.

1) Update does not refresh the track window, so it leaves it showing the old paths. The script author has explained this is due to MM API limitations http://www.ventismedia.com/mantis/view.php?id=9138. I suggest that until this is fixed, http://www.mediamonkey.com/forum/viewto ... =2&t=63823 "Usage" should have a note giving warning and a workaround (e.g. exit and relaunch).

2) If I select Media Tree, Entire Library, and then run the script, by default the script operates only on the path of the first track in the entire library track list, rather than on the entire library. http://i.imgur.com/CjG1O7G.png . Presumably it is not possible for the script to operate on all paths in the entire library if there are has multiple drives, but nevertheless I suggest it should do so if it can e.g. when there is only one drive. Workaround: if there is one drive, first select the drive: http://i.imgur.com/Ee81RIS.png .

3) Perhaps New Path should accept a bare drive designator http://i.imgur.com/x9Oahr5.png. EDIT: Currently \ is needed.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:1) Update does not refresh the track window, so it leaves it showing the old paths.
As I explained in Mantis, the add-on refreshes the tracklist correctly in MM2 and MM3 and sometimes in MM4. Unfortunately, there are situations in MM4 when that is not possible because of the bug in the program itself introduced in MM4.
chrisjj 写了:2) If I select Media Tree, Entire Library, and then run the script, by default the script operates only on the path of the first track in the entire library track list, rather than on the entire library.
There is simple logic behind GUI - you select one old path and you select one corresponding new path. I bet that many users would disagree that the script should update all drives in the Library to the single new drive if they have the Entire Library node selected before entering the script.
chrisjj 写了:3) Perhaps New Path should accept a bare drive designator http://i.imgur.com/x9Oahr5.png. Currently / is needed.
The "\" on the end of the path is not needed.
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了: Unfortunately, there are situations in MM4 when that is not possible because of the bug in the program itself introduced in MM4.
Which bug? I saw no mention in that Mantis report.
ZvezdanD 写了:There is simple logic behind GUI - you select one old path and you select one corresponding new path.
The problem is that I didn't select the old path. The script did. And its selection was entirely arbitrary.
ZvezdanD 写了:I bet that many users would disagree that the script should update all drives in the Library to the single new drive if they have the Entire Library node selected before entering the script.
Good then that no-one is suggesting such a thing :)
chrisjj 写了:The "\" on the end of the path is not needed.
I find it is. Without it, Update is disabled.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:Which bug? I saw no mention in that Mantis report.
Quote: "such solution doesn't work in MM4 always ... MM2 and MM3 didn't have that problem"
chrisjj 写了:The problem is that I didn't select the old path. The script did. And its selection was entirely arbitrary.
You didn't, but you could - you have the Old Path combo box for that. The automatic selection is not arbitrary, it depends of the selected node in the Tree panel and/or the selected file in the tracklist. I already told you about that: http://www.mediamonkey.com/forum/viewto ... 81#p392481.
chrisjj 写了:I find it is. Without it, Update is disabled.
I just checked and you are right, it is not working without "\" on the end if you have the "only for files that exist" option turned off. Thanks for the report, it will be fixed.
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了:
chrisjj 写了:Which bug? I saw no mention in that Mantis report.
Quote: "such solution doesn't work in MM4 always ... MM2 and MM3 didn't have that problem"
If that is due to a bug, rather than a documented cut-back, then still I'd be interested to hear what is the bug.
ZvezdanD 写了:You didn't, but you could - you have the Old Path combo box for that.
Agreed. The improvement I am suggesting would obviate the need for that.
ZvezdanD 写了: The automatic selection is not arbitrary, it depends of the selected node in the Tree panel and/or the selected file in the tracklist.
The selected file in the tracklist is arbitrary. It is what ever appears at the top of the list when you click Entire Library.
ZvezdanD 写了: I already told you about that: http://www.mediamonkey.com/forum/viewto ... 81#p392481.
You said (and thank you): "Select some missing file with the old drive/path in the main tracklist or select missing drive/folder in the Location or My Computer branch of the tree panel and..."

and such selection does not help at all when the tracks are in folders within the library root, and is the MM default.
ZvezdanD 写了: I just checked and you are right, it is not working without "\" on the end if you have the "only for files that exist" option turned off. Thanks for the report, it will be fixed.
Thanks.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:If that is due to a bug, rather than a documented cut-back, then still I'd be interested to hear what is the bug.
If program refuses to display the Properties dialog box for some existing drive, then it is a bug.
chrisjj 写了:The improvement I am suggesting would obviate the need for that.
No, it would not. As I said, nobody would agree with such solution which you suggested.
chrisjj 写了:The selected file in the tracklist is arbitrary.
No, it is not if you follow my instruction: "Select some missing file with the old drive/path in the main tracklist".
chrisjj 写了:such selection does not help at all when the tracks are in folders within the library root, and is the MM default.
Sorry, but I really don't know what you want to say.

Anyway, I think I will remove option for automatic selection of the old path based on the selected node/selected file and to force users to select such path in the Old path combo box. IIRC, some users already had problem with that option.
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了:If program refuses to display the Properties dialog box for some existing drive, then it is a bug.
That's not the issue I reported. The issue I reported is "1) Update does not refresh the track window, so it leaves it showing the old paths."
ZvezdanD 写了:
chrisjj 写了:The improvement I am suggesting would obviate the need for that.
No, it would not.
You're mistaken there. Read again.
ZvezdanD 写了:As I said, nobody would agree with such solution which you suggested.
The suggestion you reported didn't come from me. The one that did is clear in this thread.
ZvezdanD 写了:
chrisjj 写了:The selected file in the tracklist is arbitrary.
No, it is not if you follow my instruction: "Select some missing file with the old drive/path in the main tracklist".
You're mistaken. Your script has no effect on which track is selected. And the problem with your suggestion is that there is normally no track with the missing path in the tracklist because, as I said, tracks are normally in subfolders.
ZvezdanD 写了:
chrisjj 写了:such selection does not help at all when the tracks are in folders within the library root, and is the MM default.
Sorry, but I really don't know what you want to say.
Have a look at the paths for a typical library and you'll see. Theer is none in the root.
ZvezdanD 写了:Anyway, I think I will remove option for automatic selection of the old path based on the selected node/selected file and to force users to select such path in the Old path combo box. IIRC, some users already had problem with that option.
Thanks.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:That's not the issue I reported. The issue I reported is "1) Update does not refresh the track window, so it leaves it showing the old paths."
I understand very well what is the issue that you have reported, but you didn't understand that that issue is a consequence of the bug in MM4: "there are situations in MM4 when that is not possible because of the bug in the program itself introduced in MM4".
chrisjj 写了:You're mistaken there. Read again.
I read it again and I still think that you are mistaken here. Your suggestion is not an improvement.
chrisjj 写了:The suggestion you reported didn't come from me. The one that did is clear in this thread.
I really don't know what you want to say. What suggestion that I reported you are talking about? Yes, your suggestion is clear - you suggested that I modify script to allow update of all drives in the Library if user has the Entire Library node selected and I told you that nobody would want that. Do you want that we start a poll about your suggestion?
chrisjj 写了:You're mistaken. Your script has no effect on which track is selected.
Of course that my script has no effect on which track is selected and that is why I told you that it is you who should make that selection.
chrisjj 写了:Have a look at the paths for a typical library and you'll see. Theer is none in the root.
So what? If you select the root of the drive in the Media Tree that drive would be auto-selected in the Old path combo box. And if it is not auto-selected, you always could make your selection using that combo box.
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了:I understand very well what is an issue that you have reported, but you didn't understand that that issue is a consequence of the bug in MM4
You're right. I don't understand that this is due to a bug in MM4. That's because you've not IDed the bug you say is the cause. Please do post a link to the Mantis entry IDing this bug.
ZvezdanD 写了:Yes, your suggestion is clear - you suggested that I modify script to allow update of all drives in the Library if user has the Entire Library node selected
You're mistaken. That must have been someone else's suggestion. Mine was for one drive. See it here: http://www.mediamonkey.com/forum/viewto ... 45#p396645
ZvezdanD 写了:
chrisjj 写了:Have a look at the paths for a typical library and you'll see. Theer is none in the root.
So what?
So your suggestion "Select some missing file with the old drive/path in the main tracklist" does not work.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:Please do post a link to the Mantis entry IDing this bug.
http://www.ventismedia.com/mantis/view.php?id=9138
chrisjj 写了:You're mistaken. That must have been someone else's suggestion.
Who wrote this: "If I select Media Tree, Entire Library, and then run the script, by default the script operates only on the path of the first track in the entire library track list, rather than on the entire library"?
chrisjj 写了:So your suggestion "Select some missing file with the old drive/path in the main tracklist" does not work.
Did you read the whole suggestion of mine, including: "or select missing drive/folder in the Location or My Computer branch of the tree panel"?
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了:
chrisjj 写了:Please do post a link to the Mantis entry IDing this bug.
http://www.ventismedia.com/mantis/view.php?id=9138
I see "Severity feature" request: "Method to update tree and tracklist after SQL modifications to Medias table needed"

No bug.
ZvezdanD 写了:
chrisjj 写了:You're mistaken. That must have been someone else's suggestion.
Who wrote this: "If I select Media Tree, Entire Library, and then run the script, by default the script operates only on the path of the first track in the entire library track list, rather than on the entire library"?
I did. That's not a suggestion. Read my suggestion and you will see why you are mistaken:

"I suggest it should do so if it can e.g. when there is only one drive."
ZvezdanD 写了:Did you read the whole suggestion of mine, including: "or select missing drive/folder in the Location or My Computer branch of the tree panel"?
Your second suggestion works. Thanks.
Chris
ZvezdanD
帖子: 3272
注册时间: 周四 6月 08, 2006 7:40 pm

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

帖子 由 ZvezdanD »

chrisjj 写了:I see "Severity feature" request: "Method to update tree and tracklist after SQL modifications to Medias table needed"

No bug.
The mentioned request contains description of the bug introduced in MM4.
chrisjj 写了:I did. That's not a suggestion.
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.
chrisjj 写了:Your second suggestion works. Thanks.
If you tried my whole suggestion at first place, we would not have this unnecessary discussion.

Anyway, here is the algorithm that I could implement for auto-selection of the Old path combo box:
- if the selected file from the tracklist is from missing drive -> that drive and path would be auto-selected;
- if the tree panel is active before opening the script's dialog box and if the selected node contains some missing drive/path -> that drive and path would be auto-selected;
- if the tree panel is active before opening the script's dialog box and if the selected node doesn't contain some missing drive/path, but the selected file in the tracklist is from missing drive -> that drive and path would be auto-selected;
- if none of previous conditions is satisfied then the root of the first missing drive from the Library would be automatically selected;
- if the Library doesn't contain missing drives at all then the drive and path of the selected file would be auto-selected.
● 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
chrisjj
帖子: 5007
注册时间: 周三 2月 14, 2007 5:14 pm

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

帖子 由 chrisjj »

ZvezdanD 写了:The mentioned request contains description of the bug introduced in MM4.
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.
ZvezdanD 写了: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. The suggestion is only "I suggest it should do so [operate on all paths in the entire library] if it can e.g. when there is only one drive"
ZvezdanD 写了:If you tried my whole suggestion at first place, we would not have this unnecessary discussion.
I did try your whole suggestion. Even before you made it. 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".

My suggested fix would make the workaround unnecessary.
ZvezdanD 写了: Anyway, here is the algorithm that I could implement for auto-selection of the Old path combo box:
- if the selected file from the tracklist is from missing drive -> that drive and path would be auto-selected;
- if the tree panel is active before opening the script's dialog box and if the selected node contains some missing drive/path -> that drive and path would be auto-selected;
- if the tree panel is active before opening the script's dialog box and if the selected node doesn't contain some missing drive/path, but the selected file in the tracklist is from missing drive -> that drive and path would be auto-selected;
- if none of previous conditions is satisfied then the root of the first missing drive from the Library would be automatically selected;
- if the Library doesn't contain missing drives at all then the drive and path of the selected file would be auto-selected.
Sounds good. Thanks. 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\.
Chris
回复