This class defines the structure for a episode object. A episode object describes a video (or other media) file.

Episode contains the following public methods:

MethodDescription
db_load_by_name() Load a record by ID / Name.
db_load_by_num() Load a record by record number.
db_save() Save the record to the database using Insert or Update as appropriate.
db_delete() Delete this object record from the database.
clear_keywords() Clear the keyword list.
refresh_keywords() Clear the keyword list and refresh it from the database.
add_keyword() Add a keyword to the keyword list.
remove_keyword() Remove a keyword from the keyword list.
has_keyword() Determines if the Episode has a given keyword assigned
tape_length_str() Return a string representation (HH:MM:SS) of tape length.
lock_record() Lock a record. If the lock is unable to be obtained, a RecordLockedError exception is raised with the username of the lock holder passed.
unlock_record() Unlock a record.
duplicate() Return a copy of the object with only the record number changed.
get_note_nums() Get a list of Note numbers that belong to this Object.
get_episode_nums() Get a list of Episode numbers that belong to this Series.
clear() Clear all properties, resetting them to default values.

Episode contains the following public properties:

PropertyDescription
series_num The number of the series to which the episode belongs.
series_id The name of the series to which the episode belongs.
media_filename The name (including path) of the media file.
tape_length The length of the file in milliseconds.
tape_date The date the media was recorded.
tape_date_db tape_date in the format needed for the MySQL database
keyword_list The list of keywords that have been applied to the Episode.
comment Description of the Object.
id ID or Name (required).
isLocked Object Is Locked?
lock_time Time of the last record lock (Read only).
number Record number (auto-incremented database field).
record_lock Username of person who has locked the record (Read only).