Move video over to software_id
This commit is contained in:
@@ -141,12 +141,24 @@ class Video extends Abstracted\Catalog
|
||||
$this->gps_altitude = $this->property('gps_altitude');
|
||||
}
|
||||
|
||||
// @todo Now set software_id
|
||||
public function setMakeModel()
|
||||
{
|
||||
$this->make = $this->property('make');
|
||||
$this->model = $this->property('model');
|
||||
$this->software = $this->property('software');
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('make') ?: NULL,
|
||||
]);
|
||||
|
||||
$mo = Model::firstOrCreate([
|
||||
'name'=>$this->property('model') ?: NULL,
|
||||
'make_id'=>$ma->id,
|
||||
]);
|
||||
|
||||
$so = Software::firstOrCreate([
|
||||
'name'=>$this->property('software') ?: NULL,
|
||||
'model_id'=>$mo->id,
|
||||
]);
|
||||
|
||||
$this->software_id = $so->id;
|
||||
|
||||
$this->type = $this->property('type');
|
||||
$this->length = round($this->property('length'),2);
|
||||
$this->codec = $this->property('codec');
|
||||
|
Reference in New Issue
Block a user