Page 1 of 1

[RESOLVED] [FR] ImportXML

Posted: 2009-03-02 14:40:35
by tuck
Bonjour à tous,

Je souhaite mettre à jour mon catalogue au moyen du script ImportXML à partir d'un catalogue XML (édité à partir de AMC, récupéré sur un autre PC). Le problème est que j'obtiens l'erreur : "Erreur de script dans "XMLIMPORT" : class is not created à la ligne 29".

Quelles sont les solutions possibles ? Y a-t-il un autre moyen ?

Merci d'avance. Un grand merci à Antoine pour son fabuleux logiciel, ainsi qu'aux concepteurs des scripts.

Tuck

Posted: 2009-03-02 22:25:01
by bad4u
This happens if field "Original Title" on imported catalog is empty for some/all movies you try to import (error on line 29 = original title / line 28 = translated title). You have to fill these fields before you can use the script. Maybe it works if you outcomment line 29 (add two slashes // on the beginning of the line, but script might fail if this variable should be needed somewhere else - didn't test it).

Posted: 2009-03-02 23:55:08
by tuck
Hello,

In first, sorry about my bad English.

Thanks a lot for your answer ; I try (with a complete fields) and now the script works very well.

Tuck

Posted: 2009-03-03 06:34:54
by bad4u
If you have more movies with empty original title field you can use a small script to fill these :

Code: Select all

program NewScript;
begin
  if getField(fieldOriginalTitle) = '' then
    setField(fieldOriginalTitle, getField(fieldTranslatedTitle));
end.
The script checks for empty original title field, if so it copies translated title to field original title.

Posted: 2009-03-03 12:56:49
by tuck
Hello Bad4u,

Thanks again for your little script ; I used it ant it was exactly what I need.

Tuck