[REQ] Copy fields from original title to translated title

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
DarthPeacemaker
Posts: 19
Joined: 2007-05-05 12:53:59

[REQ] Copy fields from original title to translated title

Post by DarthPeacemaker »

When it is imported a single film is possible to fill up the fields "original title" and "translated title" with the same name of the file (avoid extension).

Also, it is possible to do an script that it does
If Original title is empty then original title =translated title
else
If translated title is empty then translated title= original title
Thanks
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

In Tools -> Options -> Media file importation there is an option "Import filename as title".
For the script, you can do this:

Code: Select all

program NewScript;
begin
  if GetField(fieldOriginalTitle) = '' then
    SetField(fieldOriginalTitle, GetField(fieldTranslatedTitle));
  if GetField(fieldTranslatedTitle) = '' then
    SetField(fieldTranslatedTitle, GetField(fieldOriginalTitle));
end.
DarthPeacemaker
Posts: 19
Joined: 2007-05-05 12:53:59

Post by DarthPeacemaker »

antp wrote:In Tools -> Options -> Media file importation there is an option "Import filename as title".
For the script, you can do this:

Code: Select all

program NewScript;
begin
  if GetField(fieldOriginalTitle) = '' then
    SetField(fieldOriginalTitle, GetField(fieldTranslatedTitle));
  if GetField(fieldTranslatedTitle) = '' then
    SetField(fieldTranslatedTitle, GetField(fieldOriginalTitle));
end.
Really works.
Thanks :cool:
Post Reply