Page 1 of 1

Origons export & IMDB numbers

Posted: 2003-08-18 10:56:13
by voivod9
Hi!

I'll post this here, but i'm not sure if this qualifies as a bug.
Just tried to import my AMC list in Origons.com. The IMDB numbers failed to be inserted correctly. Origons expected just the IMDB numbers, but AMC sent the whole url. Most scripts put the whole url in the url filed and that's allright, but the AMC should extract the IMDB number from this and export just the number to the origons file.

Posted: 2003-08-18 16:45:33
by antp
Well, AMC does not know what you put in the field.
You can make a small script that will modify all your URL to remove the beginning of the URL in your movie infos, or just use a search/replace function (e.g. with Notepad) in the exported file.

Posted: 2003-08-19 09:51:33
by voivod9
antp wrote:Well, AMC does not know what you put in the field.
That's ok, but there should be a warning somewhere about how this is supposed to work. You could put some help text in the export dialog.

This is a script i made to extract the IMDB number

Code: Select all

// SCRIPTING
// Extracts IMDB number from URL
program URLtoIMDBno;

procedure fixOne(prefix: string);
var 
  url: string;
begin
  prefix:=AnsiLowerCase(prefix);
  url:=AnsiLowerCase(GetField(FieldURL));
  if Pos(prefix, url) > 0 then
    SetField(FieldURL, StringReplace(url, prefix, ''));
end;

begin
  fixOne('http://us.imdb.com/Title?');
  fixOne('http://uk.imdb.com/Title?');
  fixOne('http://imdb.com/Title?');
  fixOne('http://amazon.imdb.com/Title?');
  fixOne('http://www.us.imdb.com/Title?');
  fixOne('http://www.uk.imdb.com/Title?');
  fixOne('http://www.imdb.com/Title?');
  fixOne('http://www.amazon.imdb.com/Title?');
  fixOne('http://akas.imdb.com/Title?');
// that's enough aliases for today :)
end.