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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

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

Post by ZvezdanD » Thu Jul 03, 2014 4:25 pm

chrisjj wrote:
ZvezdanD wrote: You don't have "S:" in the database
May I ask what indicates that?
chrisjj wrote:the dialog offers me only P:
ZvezdanD wrote:The Old path combo box of this add-on displays only paths/drives that are already stored in the database.
Open your database in some SQLite editor like SQLiteSpy and execute next statement:

Code: Select all

SELECT Count(*) FROM Medias WHERE DriveLetter = 18
If you get some number greater than 0 as result then my add-on has a bug. In that case please pack your database with Zip and upload it to some file server like Dropbox and send me link to it in PM.
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Thu Jul 03, 2014 4:53 pm

ZvezdanD wrote:
chrisjj wrote:
ZvezdanD wrote: You don't have "S:" in the database
May I ask what indicates that?
chrisjj wrote:the dialog offers me only P:
No doubt that would be true if the program was working correctly. I'm suggesting there's a flaw.

I've updated the report to show that S: is in the media tree.
ZvezdanD wrote:The Old path combo box of this add-on displays only paths/drives that are already stored in the database.
Well, I think that too is faulty, because it displays P: and there is no P: in the media tree.
ZvezdanD wrote:Open your database in some SQLite editor like SQLiteSpy and execute next statement:

Code: Select all

SELECT Count(*) FROM Medias WHERE DriveLetter = 18
If you get some number greater than 0 as result then my add-on has a bug.
I get 1 : http://i.imgur.com/rqHNMZe.png
ZvezdanD wrote:In that case please pack your database with Zip and upload it to some file server like Dropbox and send me link to it in PM.
OK, will do. Please keep the database confidential.
Chris

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

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

Post by ZvezdanD » Thu Jul 03, 2014 5:36 pm

chrisjj wrote:I've updated the report to show that S: is in the media tree.
...
Well, I think that too is faulty, because it displays P: and there is no P: in the media tree.
It doesn't matter what is displayed in the tree but what is stored in the database. This add-on could update location for files that was located on the drive that doesn't exist anymore.

However, from your database it is obvious that there is a problem which was already reported by dtsig - you have 4 drives with 2 serial numbers. The difference is because he has two physical drives with the same serial number and you have the same drive with two drive letters that you got using Subst.

I will fix add-on to allow work with multiple drives with the same serial number as soon as possible. Thanks for the report and database.
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Thu Jul 03, 2014 5:43 pm

ZvezdanD wrote:It doesn't matter what is displayed in the tree but what is stored in the database.
S: is in the tree, P: isn't. If you're suggesting P: is in the database and S: isn't... I'm surprised.
ZvezdanD wrote:... you have the same drive with two drive letters that you got using Subst.
I did highlight the SUBST in my initial report.
ZvezdanD wrote:I will fix add-on to allow work with multiple drives with the same serial number as soon as possible.
I'd settle for a fix for a single drive with multiple letters :)

Thanks.
Chris

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

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

Post by ZvezdanD » Thu Jul 03, 2014 6:18 pm

chrisjj wrote:S: is in the tree, P: isn't. If you're suggesting P: is in the database and S: isn't... I'm surprised.
I am not suggesting that S: is not in the database. As I said, you have 4 drive letters with 2 serial numbers stored in the database: P: and S: with one serial number and C: and P: with another one.
chrisjj wrote:I did highlight the SUBST in my initial report.
That still doesn't mean that both drives, physical and substituted are stored in the database. I needed your database to reveal that.
chrisjj wrote:I'd settle for a fix for a single drive with multiple letters :)
Maybe in meantime you could try to specify P: in Old drive combo box even if you want to update S:, just make sure that it has the same label and serial number.
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Thu Jul 03, 2014 6:42 pm

ZvezdanD wrote:I am not suggesting that S: is not in the database.
OK, then I don't know what you meant by "You don't have "S:" in the database".
ZvezdanD wrote:That still doesn't mean that both drives, physical and substituted are stored in the database. I needed your database to reveal that.
And did it? Because I see no DB reference to the SUBST "P:".
ZvezdanD wrote:Maybe in meantime you could try to specify P: in Old drive combo box even if you want to update S:, just make sure that it has the same label and serial number.
As I said, that prevents me entering the correct path.
Chris

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

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

Post by ZvezdanD » Fri Jul 04, 2014 1:17 am

chrisjj wrote:OK, then I don't know what you meant by "You don't have "S:" in the database".
Yes, I said that. But after that I said also:
ZvezdanD wrote:If you get some number greater than 0 as result then my add-on has a bug.
The bug is because my add-on assumes that a database cannot have stored two drives with the same serial number. In case that it has like your, the add-on displays only the first drive, which is P: in your case.
chrisjj wrote:
ZvezdanD wrote:That still doesn't mean that both drives, physical and substituted are stored in the database. I needed your database to reveal that.
And did it? Because I see no DB reference to the SUBST "P:".
Try next SQL statement with your database and you will see that you have both P: and S: stored in it with the same serial number:

Code: Select all

SELECT SerialNumber, SubStr('ABCDEFGHIJKLMNOPQRSTUVWXYZ', DriveLetter + 1, 1)
FROM Medias WHERE DriveLetter IS NOT NULL
chrisjj wrote:As I said, that prevents me entering the correct path.
I suppose your substituted drive has the same paths as the physical one except the drive letter. But never mind, forget about that suggestion and wait for the next update of this add-on.
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Fri Jul 04, 2014 7:15 am

ZvezdanD wrote:Try next SQL statement with your database and you will see that you have both P: and S: stored in it with the same serial number:
Confirmed. And worse, P twice with different serial numbers.

Image

Many to many. I'd say "What a mess", except that in the absence of any public documentation of these field, GOK what they are supposed to mean.

And Optimise doesn't clear this up.
chrisjj wrote:I suppose your substituted drive has the same paths as the physical one except the drive letter.
Again Z you suppose wrong. It has a folder.
ZvezdanD wrote:But never mind, forget about that suggestion and wait for the next update of this add-on.
OK, thanks.
Chris

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Fri Jul 04, 2014 7:43 pm

Thanks for 1.4. It looks better:

Image

but how come only two drives are shown?

Image
Chris

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

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

Post by ZvezdanD » Sat Jul 05, 2014 1:47 am

chrisjj wrote:how come only two drives are shown?
Only drives that have files in Songs, Playlists or SynchLocation tables are shown:

Code: Select all

SELECT SerialNumber, CASE WHEN DriveLetter IS NOT NULL THEN SubStr('ABCDEFGHIJKLMNOPQRSTUVWXYZ', DriveLetter + 1, 1) ELSE 'net/url' END AS DrvLetter, 
(SELECT Count(*) FROM Songs WHERE Songs.IDMedia = Medias.IDMedia COLLATE NOCASE) +
(SELECT Count(*) FROM Playlists WHERE Playlists.srcMedia = Medias.IDMedia COLLATE NOCASE) +
(SELECT Count(*) FROM SynchLocation WHERE SynchLocation.IDMedia = Medias.IDMedia COLLATE NOCASE) AS NumberOfFiles
FROM Medias
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Sat Jul 05, 2014 6:57 am

OK, thanks.

BTW, does that target set include Now Playing?
Chris

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

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

Post by ZvezdanD » Sat Jul 05, 2014 7:38 am

chrisjj wrote:does that target set include Now Playing?
I don't understand what you want to ask.
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Sat Jul 05, 2014 7:41 am

"files in Songs, Playlists or SynchLocation" is a target set Does it include files in Now Playing?
Chris

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

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

Post by ZvezdanD » Sat Jul 05, 2014 7:49 am

chrisjj wrote:"files in Songs, Playlists or SynchLocation" is a target set Does it include files in Now Playing?
Location of files in Now Playing will be updated if they are already stored in the database into mentioned tables. You know that the name of this add-on is "Update Location of Files in Database", right?
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

chrisjj
Posts: 4933
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

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

Post by chrisjj » Sun Jul 06, 2014 7:11 am

ZvezdanD wrote:. You know that the name of this add-on is "Update Location of Files in Database", right?
I do. Are you suggesting Now Playing tracks are not stored in the database?
Chris

Post Reply