class MetadataController extends Controller

Traits

AuthorizesRequests
ValidatesRequests

Methods

bool
isAutomatedRequest(Request $request = null)

Determines if the request was done by an automated script (with API token or ajax).

RedirectResponse
fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

isFilledString($x)

Determine if a value is not null and not an empty string.

Response
store(StoreVolumeMetadata $request)

Add or update file metadata for a volume.

updateImageMetadata(StoreVolumeMetadata $request)

Update volume metadata for each image.

updateVideoMetadata(StoreVolumeMetadata $request)

Update volume metadata for each video.

Collection
mergeVideoMetadata(Video $video, Collection $rows)

Merge existing video metadata with new metaddata based on timestamps.

bool
hasMetadata(Video $video)

Determine if a video has any metadata.

Details

in Controller at line 21
bool isAutomatedRequest(Request $request = null)

Determines if the request was done by an automated script (with API token or ajax).

Parameters

Request $request

Return Value

bool

in Controller at line 15
protected RedirectResponse fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

Return Value

RedirectResponse

isFilledString($x)

Determine if a value is not null and not an empty string.

Parameters

$x

at line 59
Response store(StoreVolumeMetadata $request)

Add or update file metadata for a volume.

Parameters

StoreVolumeMetadata $request

Return Value

Response

at line 83
protected updateImageMetadata(StoreVolumeMetadata $request)

Update volume metadata for each image.

Parameters

StoreVolumeMetadata $request

at line 116
protected updateVideoMetadata(StoreVolumeMetadata $request)

Update volume metadata for each video.

Parameters

StoreVolumeMetadata $request

at line 161
protected Collection mergeVideoMetadata(Video $video, Collection $rows)

Merge existing video metadata with new metaddata based on timestamps.

Timestamps of existing metadata are extended, even if no new values are provided for the fields. New values are extended with existing timestamps, even if these timestamps are not provided in the new metadata.

Parameters

Video $video
Collection $rows

Return Value

Collection

at line 247
protected bool hasMetadata(Video $video)

Determine if a video has any metadata.

Parameters

Video $video

Return Value

bool