Minor fixes

This commit is contained in:
Deon George
2019-12-21 22:57:34 +11:00
parent bcdbc1715e
commit 4adf66c318
7 changed files with 40 additions and 39 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Models;
use DB;
use Illuminate\Support\Arr;
class Video extends Abstracted\Catalog
@@ -31,6 +30,11 @@ class Video extends Abstracted\Catalog
if (is_null($this->_o))
{
/*
* @todo There is a bug with getID3, where the second iteration yields different results
* this is problematic when video:scanall is run from a queue and there is more than 1 job.
* It also appears that only 1.9.18 gets date/gps data, a later version doesnt get gps data.
*/
$this->_o = new \getID3;
$this->_o->analyze($this->file_path());
$this->_o->getHashdata('sha1');
@@ -122,8 +126,7 @@ class Video extends Abstracted\Catalog
public function setDateCreated()
{
if ($this->property('creationdate'))
$this->date_created = $this->property('creationdate');
$this->date_created = $this->property('creationdate');
}
public function setDateCreatedAttribute($value)
@@ -145,7 +148,7 @@ class Video extends Abstracted\Catalog
$this->model = $this->property('model');
$this->software = $this->property('software');
$this->type = $this->property('type');
$this->length = $this->property('length');
$this->length = round($this->property('length'),2);
$this->codec = $this->property('codec');
$this->audiochannels = $this->property('audiochannels');
$this->channelmode = $this->property('channelmode');