NAME
Video::PlaybackMachine::ContentManager -- Routines to manage PlaybackMachine content
DESCRIPTION
Utility routines for dealing with movie files and the database.
EXPORTED SUBROUTINES
get_missing()
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()
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()
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()
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()
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.
fix_all_lengths()
Runs through all items in the database and rereads and fixes the lengths.