Move video over to software_id
This commit is contained in:
@@ -20,11 +20,6 @@ class Photo extends Abstracted\Catalog
|
||||
8=>-90,
|
||||
];
|
||||
|
||||
public function software()
|
||||
{
|
||||
return $this->belongsTo(Software::class);
|
||||
}
|
||||
|
||||
public function getIDLinkAttribute()
|
||||
{
|
||||
return $this->HTMLLinkAttribute($this->id,url('p/info').'/');
|
||||
@@ -184,12 +179,23 @@ class Photo extends Abstracted\Catalog
|
||||
$this->gps_lon = static::latlon(preg_split('/,\s?/',$this->property('exif:GPSLongitude')),$this->property('exif:GPSLongitudeRef'));
|
||||
}
|
||||
|
||||
// @todo Now set software_id
|
||||
public function setMakeModel()
|
||||
{
|
||||
$this->make = $this->property('exif:Make') ? $this->property('exif:Make') : NULL;
|
||||
$this->model = $this->property('exif:Model') ? $this->property('exif:Model') : NULL;
|
||||
$this->software = $this->property('exif:Software') ? $this->property('exif:Software') : NULL;
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('exif:Make') ?: NULL,
|
||||
]);
|
||||
|
||||
$mo = Model::firstOrCreate([
|
||||
'name'=>$this->property('exif:Model') ?: NULL,
|
||||
'make_id'=>$ma->id,
|
||||
]);
|
||||
|
||||
$so = Software::firstOrCreate([
|
||||
'name'=>$this->property('exif:Software') ?: NULL,
|
||||
'model_id'=>$mo->id,
|
||||
]);
|
||||
|
||||
$this->software_id = $so->id;
|
||||
}
|
||||
|
||||
public function setSignature()
|
||||
|
Reference in New Issue
Block a user