Models
Django models for video app.
Models for the video application keep track of uploaded videos and converted versions
- class signbank.video.models.GlossVideo(*args, **kwargs)
A video that represents a particular idgloss
- correct_duplicate_versions()
If glosses glossvideos have duplicate version numbers, reset version numbers.
- create_filename()
Returns a correctly named filename
- create_poster_filename(ext)
Returns a preferred filename of posterfile. Ext is the file extension without the dot.
- dataset
The Dataset/Lexicon this GlossVideo is part of.
- get_extension()
Returns videofiles extension.
- get_glosses_videos()
Returns queryset of glosses GlossVideos.
- get_videofile_modified_date()
Return a Datetime object from filesystems last modified time of path.
- gloss
The Gloss this GlossVideo belongs to.
- has_poster()
Returns true if the glossvideo has a poster file.
- is_public
Boolean: Is this GlossVideo public? Do you want to show it in the public interface, for a published Gloss?
- move_video_version(direction)
Move video back or forth in glosses videos.
- next_version()
Return a next suitable version number.
- posterfile
Poster image of the GlossVideo.
- static rename_glosses_videos(gloss)
Renames the filenames of selected Glosses videos to match the Gloss name
- rename_video()
Rename the video and move the video to correct path if the glossvideo object has a foreignkey to a gloss.
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- title
Descriptive title of the GlossVideo.
- version
Version number of the GlossVideo within Glosses videos.
- videofile
Video file of the GlossVideo.
- class signbank.video.models.GlossVideoStorage
Video storage, handles saving to directories based on filenames first two characters.
- get_valid_name(name)
Generate a valid name, save videos to a ‘base_directory’, and under it use directories named for the first two characters in the filename to partition the videos