Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentProgress ¶
CurrentProgress represents how long the video has been playing it will be useful eventually for choosing the exact right screenshot
func GetCurrentlyPlaying ¶
func GetCurrentlyPlaying()
GetCurrentlyPlaying will use lsof to figure out which dashcam video is currently playing (seriously) TODO: consider making this return a video struct
Types ¶
type Video ¶
type Video struct { Id int `db:"id"` Slug string `db:"slug"` Lat float64 `db:"lat"` Lng float64 `db:"lng"` NextVid sql.NullInt64 `db:"next_vid"` PrevVid sql.NullInt64 `db:"prev_vid"` Flagged bool `db:"flagged"` State string `db:"state"` DateFilmed time.Time `db:"date_filmed"` DateCreated time.Time `db:"date_created"` }
Videos represent a video file containing dashcam footage
var CurrentlyPlaying Video
CurrentlyPlaying is the video that is currently playing
func FindRandomByState ¶
func LoadOrCreate ¶
LoadOrCreate() will look up the video in the DB, or add it to the DB if it's not there yet
func (Video) DashStr ¶
a DashStr is the string we get from the dashcam an example file: 2018_0514_224801_013.MP4 an example dashstr: 2018_0514_224801_013 ex: 2018_0514_224801_013
func (Video) Next ¶
Next() finds the next unflagged video TODO: should this be NextUnflagged? TODO: handle errors in here?