Minor fixes
This commit is contained in:
parent
bcdbc1715e
commit
4adf66c318
@ -139,7 +139,7 @@ class VideoImport extends Command
|
|||||||
$this->dispatch((new \App\Jobs\CatalogScan($o))->onQueue('scan'));
|
$this->dispatch((new \App\Jobs\CatalogScan($o))->onQueue('scan'));
|
||||||
|
|
||||||
if ($this->option('dumpid3'))
|
if ($this->option('dumpid3'))
|
||||||
dd($o->dump());
|
dd($o->properties());
|
||||||
}
|
}
|
||||||
|
|
||||||
$bar->finish();
|
$bar->finish();
|
||||||
|
@ -155,7 +155,6 @@ abstract class Catalog extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the new name for the image
|
* Determine the new name for the image
|
||||||
* @todo Make Generic for Photo and Video
|
|
||||||
*/
|
*/
|
||||||
public function file_path($short=FALSE,$new=FALSE)
|
public function file_path($short=FALSE,$new=FALSE)
|
||||||
{
|
{
|
||||||
@ -229,7 +228,7 @@ abstract class Catalog extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getDateCreatedAttribute() {
|
public function getDateCreatedAttribute() {
|
||||||
return Carbon::createFromTimestamp($this->attributes['date_created']);
|
return $this->attributes['date_created'] ? Carbon::createFromTimestamp($this->attributes['date_created']) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,7 +42,6 @@ class Photo extends Abstracted\Catalog
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the new name for the image
|
* Determine the new name for the image
|
||||||
* @todo Implement in Parent
|
|
||||||
*/
|
*/
|
||||||
public function file_path($short=FALSE,$new=FALSE)
|
public function file_path($short=FALSE,$new=FALSE)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use DB;
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
class Video extends Abstracted\Catalog
|
class Video extends Abstracted\Catalog
|
||||||
@ -31,6 +30,11 @@ class Video extends Abstracted\Catalog
|
|||||||
|
|
||||||
if (is_null($this->_o))
|
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 = new \getID3;
|
||||||
$this->_o->analyze($this->file_path());
|
$this->_o->analyze($this->file_path());
|
||||||
$this->_o->getHashdata('sha1');
|
$this->_o->getHashdata('sha1');
|
||||||
@ -122,7 +126,6 @@ class Video extends Abstracted\Catalog
|
|||||||
|
|
||||||
public function setDateCreated()
|
public function setDateCreated()
|
||||||
{
|
{
|
||||||
if ($this->property('creationdate'))
|
|
||||||
$this->date_created = $this->property('creationdate');
|
$this->date_created = $this->property('creationdate');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +148,7 @@ class Video extends Abstracted\Catalog
|
|||||||
$this->model = $this->property('model');
|
$this->model = $this->property('model');
|
||||||
$this->software = $this->property('software');
|
$this->software = $this->property('software');
|
||||||
$this->type = $this->property('type');
|
$this->type = $this->property('type');
|
||||||
$this->length = $this->property('length');
|
$this->length = round($this->property('length'),2);
|
||||||
$this->codec = $this->property('codec');
|
$this->codec = $this->property('codec');
|
||||||
$this->audiochannels = $this->property('audiochannels');
|
$this->audiochannels = $this->property('audiochannels');
|
||||||
$this->channelmode = $this->property('channelmode');
|
$this->channelmode = $this->property('channelmode');
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="user-block">
|
<div class="user-block">
|
||||||
<i class="float-left fa fa-2x fa-camera"></i><span class="username"><a href="#">#{{ $o->id }} - {{ \Illuminate\Support\Str::limit($o->filename,12).\Illuminate\Support\Str::substr($o->filename,-16) }}</a></span>
|
<i class="float-left fa fa-2x fa-camera"></i><span class="username"><a href="#">#{{ $o->id }} - {{ \Illuminate\Support\Str::limit($o->filename,12).\Illuminate\Support\Str::substr($o->filename,-16) }}</a></span>
|
||||||
<span class="description">{{ $o->date_created->toDateTimeString() }} [{{ $o->device() }}]</span>
|
<span class="description">{{ $o->date_created ? $o->date_created->toDateTimeString() : '-' }} [{{ $o->device() }}]</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.user-block -->
|
<!-- /.user-block -->
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
|
@ -25,13 +25,13 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
<li class="page-item @if(! $x=$o->previous())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
<li class="page-item @if(! $x=$o->previous())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
||||||
<a class="page-link" href="{{ $x ? url('p/info',$x->id) : '#' }}"><<</a>
|
<a class="page-link" href="{{ $x ? url('v/info',$x->id) : '#' }}"><<</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $o->id }}</span></li>
|
<li class="page-item active" aria-current="page"><span class="page-link">{{ $o->id }}</span></li>
|
||||||
|
|
||||||
<li class="page-item @if(! $x=$o->next())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
<li class="page-item @if(! $x=$o->next())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
||||||
<a class="page-link" href="{{ $x ? url('p/info',$x->id) : '#' }}">>></a>
|
<a class="page-link" href="{{ $x ? url('v/info',$x->id) : '#' }}">>></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
Loading…
Reference in New Issue
Block a user