CDpedia - XML Import on Disc ID and Duration

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
DanThe
Addicted to Bruji
Addicted to Bruji
Posts: 155
Joined: Tue Jan 05, 2016 6:23 pm

CDpedia - XML Import on Disc ID and Duration

Post by DanThe »

Hi,

When a CD is scanned the Disc ID is automatically inserted in that field and the track duration times are entered without a 0 as a prefix (i.e. 5:48 instead of 05:48).

I'm using an XML export from my previous DB and importing that XML into CDpedia. I've encountered the following 2 issues:

1. The XML export does not contain the disc ID data.
2. The Duration time from the XML export has a 0 for a prefix (i.e. 05:48 instead of 5:48).

I can copy paste the disc ID and I can manually remove the 0 prefix from the duration time but I have 2000 plus albums that would extremely time consuming. :(

Is there a way to rescan a CD for an existing album to refresh the Disc ID and Duration field data? Even a method of removing the 0 prefix without having to edit each individual track would be appreciated.
DanThe
Addicted to Bruji
Addicted to Bruji
Posts: 155
Joined: Tue Jan 05, 2016 6:23 pm

Re: CDpedia - XML Import on Disc ID and Duration

Post by DanThe »

Update. I guess it takes time before knowing where everything is with a new app.

I did some digging on this forum and found a thread called CD length that solves refreshing the duration time of the album track for a whole album.

This is done by inserting the CD into the drive, opening up the album for editing and then using the Command + T to read the CD. This is still a lot of work given the size of my collection but it beats doing this track by track.

However, this does not refresh the Disc ID field. Is there another key combination for rescanning the Disc ID?
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDpedia - XML Import on Disc ID and Duration

Post by Conor »

Hi Dan,

Sorry took a few days to stop by the forum. You can remove the leading 0 using the backend SQL database that will give you the power to send it a command to remove the leading 0. In the program called Terminal in your Application/Utilities folder it would be these three commands that you can copy paste.

Code: Select all

sqlite3 ~/Library/Application\ Support/CDpedia/Database.cdpd
UPDATE zTrack set zduration = LTRIM(zduration, "0") where zduration like "0%";
.exit 
The discID is a more complex calculation, but it's now included in the beta version of CDpedia when adding the track information to an entry that does not currently already have a discID.
DanThe
Addicted to Bruji
Addicted to Bruji
Posts: 155
Joined: Tue Jan 05, 2016 6:23 pm

Re: CDpedia - XML Import on Disc ID and Duration

Post by DanThe »

Hi Connor,

I just love the power of the command line. Thanks!

My DB is relocated in my home directory under Documents/Bruji/Music/Database.cdpd so I ran this instead.

Code: Select all

sqlite3 ~/Documents/Bruji/Music/Database.cdpd
UPDATE zTrack set zduration = LTRIM(zduration, "0") where zduration like "0%";
.exit
One second later, no more 0 prefixes. Pretty awesome.

Thanks for the information on the Disc ID. I'll look into that later

BTW I'm really enjoying the speed and stability of the apps plus the great filtering features that will help me with the transfer and cleanup of my old DB. :D
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDpedia - XML Import on Disc ID and Duration

Post by Conor »

Glad you were able to amend the command line and get that sorted out right away. I do have to get a find and replace feature into the program in the future, but the needs is rare and easily addressed with the command line for those rare occasions, so it has not been pressing on me to get it done.

The filtering is very decent, but the real power comes in exploiting the smart collections to do intelligent groupings as well as using the sorting to spot missing info and just do general cleanup. Even if the smart collection is short lived, they come in handy with the ability to set several rules at once and even base a smart collection of items already in another collection, if you want to get really advance.

Extremely happy that you are finding CDpedia enjoyable and useful.
DanThe
Addicted to Bruji
Addicted to Bruji
Posts: 155
Joined: Tue Jan 05, 2016 6:23 pm

Re: CDpedia - XML Import on Disc ID and Duration

Post by DanThe »

When I mentioned filtering, I was actually referring to the Smart Collections. For example, I setup a folder Called "By Format" and added smart collections in it for each format. A find and replace would be be handy.

I have downloaded the CDpedia beta version but have not moved it to the apps folder and I have noticed that the file info shows that the version number is the same as what I am currently using. Can the beta run side by side with the release version?
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDpedia - XML Import on Disc ID and Duration

Post by Conor »

You can indeed use both on the same computer, do try to keep the simultaneous use to a mimimim and quit one of them. CDpedia does do a lot of catching and might not see changes made by another CDpedia.
DanThe
Addicted to Bruji
Addicted to Bruji
Posts: 155
Joined: Tue Jan 05, 2016 6:23 pm

Re: CDpedia - XML Import on Disc ID and Duration

Post by DanThe »

Thanks Connor. I should of said reside side by side rather than run. :oops: Given the numerous transactions that a DB must maintain it would be risky running both at the same time.
Post Reply