Follow

How can I write a metadata lookup plugin?

Here are the instructions for writing a meta-data plugin. They're intended for an experienced programmer. 

A user can write their own lookup service. The service needs to be an executable and take arguments from the command line and returns XML to the stdio. The plugins must be installed into ~/Library/Application Support/iVI and have a .mdplugin extension. You can then select them on the Meta-Data tab of iVI's preferences. 

Here's a dummy plugin written in perl to show how the XML needs to be returned (any language can be used to write plug ins). 

 

#!/usr/bin/perl 

# Arguments passed to the plugin 

# For movies iVI passes "file name", "detected movie name", "year" 

# For TV Shows iVI passes "file name", "detected series name", "detected season number", "detected episode number", "year", "month", "day" 

 

# Required : <Result> can be Yes or No. One must be included. YES = Lookup found good data, NO = Lookup failed to find good data 

print "<Result>Yes</Result>\n"; 

 

# Optional : <Flash> can be Red or Green. iVI will flash the appropriate lookup indicator on the bottom of the main iVI window. Red should be used when the meta-data source is unavailable 

print "<Flash>Green</Flash>\n"; 

 

# Optional : <Image> points to show artwork downloaded by the plugin. The artwork should be compatible with iTunes (png or jpg) and ready 

for import. 

print "<Image>/Users/dave/Desktop/newimage.png</Image>\n"; 

 

# Remaining tags are optional and self evident 

print "<Name>TV Show or Movie Name</Name>\n";

print "<EpisodeName>TV Episode Name</EpisodeName>\n";

print "<Description>A show about something.\nOn two lines.</ Description>\n"; 

print "<Actors>Bob, Sue, Tom</Actors>\n"; 

print "<Producers>Producer 1, Producer 2</Producers>\n"; 

print "<Directors>Director 1, Director 2</Directors>\n"; 

print "<Release Date>1999-19-09</Release Date>\n"; 

print "<Rating>R</Rating>\n"; 

print "<Genre>Action & Adventure</Genre>\n";  

 

Let us know if you need any further help. If you do develop something that works then please let us know and we'll post it to our South Pole website so others can use it.

0 Comments

Article is closed for comments.