Name

getrelated — get information on sets related to the set number given

Synopsis

use Wacs;
use Wacs::WacsUI;
scalar getrelated(...); 
 

Parameters

paramterdescription
relation

gives the type of relation we're looking for. Available options are continuation, duplicates or altmedia. If continuation is specified it gives an array of set numbers starting with this set and continuing for the length of the chain. Usually this will be two or four sub-parts of a video clip. If duplicates is given it follows the duplicates link of each set until it reaches the end of the chain or returns to the first set - it returns an array of these sets. If altmedia is specified an array of set numbers will be returned prefixed by their type and a hyphen.

stypegives the type of the set we're dealing with - ie I or V.
setno

the set number to start from - most likely the first in the set but not necessarily. The progression will only be forwards however. For alternative media, this can be expected to be the start point that we don't want given back to us.

alternative

This is the first alternative number to look for when looking for alternative media. The chain continues until we get back to the set number given.

duplicates

This is the first number of a duplicate set to look for when finding alternatives. If you don't specify this option, the search will start with the set itself - sometimes this maybe what you want.

dbhandlethe database handle to use for submitting queries to the database

Summary

The function getrelated provides a tool for finding a sequence of related sets based on the requested type of relation to look for and the set number given. If the relation specified is continuation it will return an array starting with the set itself in element zero and will then follow links in snext to find the chain of related sets and each subsequent element will be the setno of the next set in the continuation chain.

If the relation specified is altmedia it will return an array of all sets of other media types related to this set, but not the set's own details.

Availability

getrelated is available from Wacs release 0.9.0 onwards in both perl and php. It was not available prior to this release.