Sha256: 3fb06ef73ae2b9a2d97b2e82c5651fcb615760880f03890f8d9f36157ed1eca8

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

# Using hooks

Multiple actions can be attached for a single hook.

**hooks placeholders:**

* job_started (video, action)
* job_finished (result, video, action)

* before_convert (video, command)
* in_convert (video, progress)
* convert_success (video, output_file)
* convert_error (video, error, ffmpeg_output)

* before_thumb (video, config)
* in_thumb (video, thumb)
* thumb_success (video, thumbs_array)
* thumb_error (video, errors)

```ruby
# multiple hooks setup
VTools::Handler.collection do
  set :in_convert do |video|
    #..
  end

  set :in_thumb do |video|
    #..
  end
  # ...
end

# single hook setup
VTools::Handler.set :job_started do
  #..
end
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vtools-0.1.1 doc/HOOKS.md
vtools-0.1.0 doc/HOOKS.md