#1 2007-04-02 06:36:43

debugger
Member
Registered: 2007-03-17
Posts: 44

Problem with genre list -- all the genres doubled.

Hi Tian,

Here is the my scenario: I downloaded from IMDB bunch of movie descriptions, including their genres, and faced all the genre lists -- in menu Filter/Genre, in drop-down list in main window -- include each genre twice. I opened my gcstar data file in text editor and found that cause of the problem is a space character at the end of genre name, e.g.:

Code:

<line>
  <col>Thriller </col>
</line>

(note space after "Thriller".) Sometimes genre has a space at the end, sometimes does not, so gcstar was formally correct -- it lists all the genres as they are, so I had both "Thriller" and "Thriller " -- but trailing space is invisible in menu, so it was full impression that "Thriller" listed twice. When I deleted all these trailing spaces directly in my movies.gcs file, genre lists became normal.

It may be a bug of IMDB plugin, however, I think gcstar core can normalize genre names (strip leading and trailing spaces) -- it will make gcstar more robust and tolerant to minor mistakes in plugings.

Last edited by debugger (2007-04-02 06:40:23)

Offline

 

#2 2007-04-03 07:54:27

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: Problem with genre list -- all the genres doubled.

Hi,

I thought about this.

First, I also think there is a problem with IMDb plugin that needs to be addressed. I will fix that ASAP.

Concerning the automatic removal of leading and trailing spaces, it is not so easy because of GCstar architecture. There is nothing that makes genre different from any other field that have a history. Everything is done in a generic way with a set of classes corresponding to widgets instantiated through an XML file.

So, while removing these spaces could have sens for genre, it could be different for another field in another collection. As an example for a collection of Whitespace code snippets wink

OK. I must admit that for the moment I don't think about real usage for this and I am pretty sure it won't impact existing collections (while I should first check for that). So what could be done is this space removal with an option in the XML file such as removespaces="no" for field tag.

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.