Trailing white space in actor listing

Report your bugs here - if someone else has already mentioned the same bug, just add on to their post with as much info as possible to make the hunting easier.
Post Reply
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Trailing white space in actor listing

Post by noisyscott »

First thanks again for the Pedias. I really do enjoy working in them!

I never noticed this before I started playing with the Front Row plug-in, but DVDPedia will not ignore any trailing white space in a credits field. This means that the same actor will be listed twice if browsing by Actor if one entry has trailing white space and another does not.

Cheers,
Scott
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Trailing white space in actor listing

Post by Conor »

Thank you for the information. We are looking at removing all trailing spaces on data entry, to avoid confusion. We are trying to figure out if there would be a legitimate reason for a trailing space. Do you by any chance remember what site you used to get your movie information, also if you could let us know the name of one of the movies so that we can double check the download of the information.
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: Trailing white space in actor listing

Post by noisyscott »

I think my trailing white spaces are from importing movies from a variety of previous applications. When I made the switch to OSX, I manually ported my database from a windows application called "Movie Library" using a variety of tools to get everything into DVDPedia. Before that I had some text and excel files. It is quite likely that I am the cause of my own problem :) .

Scott

/edited spelling
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Trailing white space in actor listing

Post by Conor »

Thank you for the information and the report, knowing where we can improve the program is very helpful, even if the original import was the cause of the problem, any issue we can make smoother the better. It's what computers are for, doing the dirty work.
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: Trailing white space in actor listing

Post by noisyscott »

I had some time to investigate my trailing whitespace problem and solved it today with the following sqlite commands. Make sure you backup your database before doing any manipulations on it!

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.pediadata
update zcredit set zname = rtrim(zname);
.exit
That's it! No more trailing whitespace and no more doubled up actor listings in the Front Row plugin.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Trailing white space in actor listing

Post by Conor »

Thank you for the tip, I did not know the rtrim function existed, I learn something new everyday. It's amazing the things that can be done with SQL.
Post Reply