TV Show Lookup
TV Show Lookup
Performs a search on TheMovieDB.org for a TV Show
Stores the Metadata inside the parameter VideoMetadata.
Use Folder Name
If the folder name should be used instead of the filename.
Note if the folder starts with Season/Staffel/Saison/Specials/S[0-9]+ the parent folder will be used.
Language
Optional ISO 639-1 language code used for metadata lookup. If none are specified English will be used.
Variables
| Variable | Description | Type | Example |
|---|---|---|---|
| tvshow.Title | The TV show title | string | The Batman |
| tvshow.Year | The original year the show aired | number | 2004 |
| VideoMetadata | Object containing video metadata | object | see below |
Use Folder Name
When selected, the folder name will be used to lookup the TV shows title.
If the title contains Season, Staffel, Saison, Specials then the parent folder will be used.
| Path | Show Name |
|---|---|
| /media/tv/Batman/Specials/Batman - 0x24.mkv | Batman |
| /media/tv/Batman/Season 2/Batman - 2x24.mkv | Batman |
| /media/tv/Batman/Staffel 2/Batman - 2x24.mkv | Batman |
| /media/tv/Batman/Saison 2/Batman - 2x24.mkv | Batman |
| /media/tv/Batman/Batman - 2x24.mkv | Batman |
Outputs
- TV Show found
- TV Show not found
VideoMetadata
// the video title
Title:string;
// the video description
Description:string;
// the year the tv show first aired
Year:int;
// the full date the tv show first aired
ReleaseDate:DateTime;
// a file path to the tv shows's art, e.g. a poster
ArtJpeg:string;
// the original language of the tv show
OriginalLanguage:string;
// a list of genres for this tv show
Genres:string[];
Example Function
var tvInfo = Variables.VideoMetadata;
if(!tvInfo)
{
Logger.WLog('Failed to get TV metadata');
return 2;
}
if(tvInfo.OriginalLanguage === 'en')
{
Logger.ILog('Its english')
return 1;
}
return 2;