Video::PlaybackMachine::ContentManager -- Routines to manage PlaybackMachine content
Utility routines for dealing with movie files and the database.
get_missing($FILENAME)
Returns any avi entries which do not exist on the local file system. Note: will not decode MRLs; assumes straight filenames.
get_title($FILENAME)
Turns a filename into a default title by removing the suffix, deleting type prefixes (such as 'movie', 'music', or 'short'), transforming underscores to spaces, and capitalizing words.
get_length($FILENAME)
If $FILENAME is readable by Xine, returns the file length. If $FILENAME is unreadable or nonexistent, croaks with "Couldn't open '$FILENAME'".
add_movie($FILENAME, $TITLE, $LENGTH)
Adds a movie to the database as schedulable content, with $FILENAME as the filename, $TITLE as the title, and $LENGTH as the length. $TITLE and $LENGTH are optional; if they're left out, they'll be derived from the file.
add_fill($FILENAME, $TITLE, $LENGTH)
Adds a movie to the database as fill content, with $FILENAME as the filename, $TITLE as the title, and $LENGTH as the length. $TITLE and $LENGTH are optional; they'll be derived from the movie file if not specified.
Runs through all items in the database and rereads and fixes the lengths.
To install Video::PlaybackMachine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Video::PlaybackMachine
CPAN shell
perl -MCPAN -e shell install Video::PlaybackMachine
For more information on module installation, please visit the detailed CPAN module installation guide.