1641
Development / Re: Creating own scripts
« on: June 16, 2008, 03:46:19 pm »
10. Functions for filling fields (at last )
10.1. Functions for filling standard fields (for information import plugins)
procedure AddSearchResult(Title1, Title2, Year, URL, PreviewURL : WideString)
Adds search result. You do not need to provide information for all the variables. Most import is to assign at least Title1 or Title2 and URL. If you do not have information to assign to a certain variable just pass ''. Ex.: AddSearchResult('Terminator', '', '', 'http://www.web-site.com/terminator.html', ''); //passes Title and URL only
procedure AddFieldValue(AField: Integer; AValue : WideString)
Fill a certain standard field with (AValue). AField can have following values:
For movies:
For persons:
procedure AddMoviePerson(Name, TransName, Role, URL : WideString; AType : Byte)
Adds movie credits (Actor, director, etc.). AType can have one of the following values:
procedure AddPersonMovie(Title, OrigTitle, Role, Year, URL : WideString; AType : Byte)
Adds a movie to a person's filmography. AType can have one of the following values:
procedure AddAward(Event, Award, Category, Recipient, Year: WideString; const Won : Boolean)
Adds an award. If you do not have information to assign to a certain variable just pass ''.
procedure AddConnection(Title, OrigTitle, Category, URL, Year: WideString)
Adds movie connection. If you do not have information to assign to a certain variable just pass ''.
procedure AddEpisode(Title, OrigTitle, Description, URL, Year, Season, Episode : WideString)
Adds an episode. If you do not have information to assign to a certain variable just pass ''.
10.2. Functions for filling other fields
procedure AddFieldValueXML(AField: WideString; AValue : WideString)
This function can be used to fill all fields except custom fields and structured fields like (credits, connections, episodes, filmography). Pass field value in AValue variable. AField is a name of the field and can have one of the following values:
For movies:
For persons:
procedure AddCustomFieldValueByNumber(CustomNumber: Integer; AValue : WideString)
Sets value of a custom field by field number.
CustomNumber - number of a custom field
AValue - field value (use '-1' for True(checked) and '0' for False)
procedure AddCustomFieldValueByName(CustomName: WideString; AValue : WideString)
Sets value of a custom field by field name.
CustomName - field name
AValue - field value (use '-1' for True(checked) and '0' for False)
10.1. Functions for filling standard fields (for information import plugins)
procedure AddSearchResult(Title1, Title2, Year, URL, PreviewURL : WideString)
Adds search result. You do not need to provide information for all the variables. Most import is to assign at least Title1 or Title2 and URL. If you do not have information to assign to a certain variable just pass ''. Ex.: AddSearchResult('Terminator', '', '', 'http://www.web-site.com/terminator.html', ''); //passes Title and URL only
procedure AddFieldValue(AField: Integer; AValue : WideString)
Fill a certain standard field with (AValue). AField can have following values:
For movies:
0 | URL |
1 | Title |
2 | Original Title |
3 | Aka |
4 | Year |
5 | Genre |
6 | Category |
7 | Country |
8 | Studio |
9 | MPAA |
10 | Additional rating |
11 | Tags |
12 | Tagline |
13 | Description |
14 | Duration |
15 | Features |
For persons:
0 | URL |
1 | Name |
2 | Translated name |
3 | Alternative names |
4 | Date of birth |
5 | Place of birth |
6 | Genre |
7 | Biography |
8 | Date of death |
procedure AddMoviePerson(Name, TransName, Role, URL : WideString; AType : Byte)
Adds movie credits (Actor, director, etc.). AType can have one of the following values:
0 | Actor |
1 | Director |
2 | Writer |
3 | Composer |
4 | Producer |
procedure AddPersonMovie(Title, OrigTitle, Role, Year, URL : WideString; AType : Byte)
Adds a movie to a person's filmography. AType can have one of the following values:
0 | Actor |
1 | Director |
2 | Writer |
3 | Composer |
4 | Producer |
procedure AddAward(Event, Award, Category, Recipient, Year: WideString; const Won : Boolean)
Adds an award. If you do not have information to assign to a certain variable just pass ''.
procedure AddConnection(Title, OrigTitle, Category, URL, Year: WideString)
Adds movie connection. If you do not have information to assign to a certain variable just pass ''.
procedure AddEpisode(Title, OrigTitle, Description, URL, Year, Season, Episode : WideString)
Adds an episode. If you do not have information to assign to a certain variable just pass ''.
10.2. Functions for filling other fields
procedure AddFieldValueXML(AField: WideString; AValue : WideString)
This function can be used to fill all fields except custom fields and structured fields like (credits, connections, episodes, filmography). Pass field value in AValue variable. AField is a name of the field and can have one of the following values:
For movies:
num | |
title | |
origtitle | |
aka | |
year | |
genre | |
country | |
studio | |
release | |
mpaa | |
location | |
category | |
tagline | |
description | |
count | |
type | |
rating | |
imdbrating | |
orating | |
orname | |
rip | |
length | |
langs | |
translation | |
resolution | |
videocodec | |
videobitrate | |
audiocodec | |
audiobitrate | |
size | |
url | |
path | |
comment | |
dateadded | |
code | |
label | |
loan | |
subs | |
framerate | |
label | |
features | |
viewed | |
bookmark | |
wish | |
loandate | |
viewdate | |
tags |
For persons:
name | |
transname | |
altnames | |
birthday | |
birthplace | |
bio | |
death |
procedure AddCustomFieldValueByNumber(CustomNumber: Integer; AValue : WideString)
Sets value of a custom field by field number.
CustomNumber - number of a custom field
AValue - field value (use '-1' for True(checked) and '0' for False)
procedure AddCustomFieldValueByName(CustomName: WideString; AValue : WideString)
Sets value of a custom field by field name.
CustomName - field name
AValue - field value (use '-1' for True(checked) and '0' for False)