Cosmetic code fixes and fix (relax) width/heigh comparison when catalog scanning
This commit is contained in:
parent
75313d8dd1
commit
f14e29a54f
@ -62,7 +62,7 @@ class CatalogScan implements ShouldQueue, ShouldBeUnique
|
||||
// Check the details are valid
|
||||
if ($this->o->file_signature === $this->o->getObjectOriginal('file_signature')) {
|
||||
// For sanity, we'll check a couple of other attrs
|
||||
if (($this->o->width !== $this->o->getObjectOriginal('width')) || ($this->o->height !== $this->o->getObjectOriginal('height'))) {
|
||||
if (($this->o->width != $this->o->getObjectOriginal('width')) || ($this->o->height != $this->o->getObjectOriginal('height'))) {
|
||||
Log::alert(sprintf('Dimensions [%s] (%s x %s) mismatch for [%s]',
|
||||
$this->o->dimensions,
|
||||
$this->o->getObjectOriginal('width'),
|
||||
|
@ -49,7 +49,7 @@ class QuickTime extends Base {
|
||||
case 'duration':
|
||||
case 'preferred_rate':
|
||||
case 'preferred_volume':
|
||||
// Height/Width is in the moov/trak/tkhd attom
|
||||
// Height/Width is in the moov/trak/tkhd atom
|
||||
case 'height':
|
||||
case 'width':
|
||||
$atom = $this->find_atoms(moov::class,1);
|
||||
|
@ -49,9 +49,9 @@ abstract class Atom
|
||||
|
||||
return $subatom->{$key};
|
||||
|
||||
// Height is in the moov/trak/tkhd attom
|
||||
// Height is in the moov/trak/tkhd atom
|
||||
case 'height':
|
||||
// Width is in the moov/trak/tkhd attom
|
||||
// Width is in the moov/trak/tkhd atom
|
||||
case 'width':
|
||||
$atom = $this->find_atoms(trak::class);
|
||||
|
||||
|
@ -23,9 +23,9 @@ abstract class SubAtom extends Atom
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
switch ($key) {
|
||||
// Height is in the moov/trak/tkhd attom
|
||||
// Height is in the moov/trak/tkhd atom
|
||||
case 'height':
|
||||
// Width is in the moov/trak/tkhd attom
|
||||
// Width is in the moov/trak/tkhd atom
|
||||
case 'width':
|
||||
$atom = $this->find_atoms(tkhd::class,1);
|
||||
|
||||
|
@ -93,10 +93,6 @@ class stsd extends SubAtom
|
||||
case 'video_codec':
|
||||
return Arr::get($this->video,'codec');
|
||||
|
||||
case 'video_framerate':
|
||||
dd($this);
|
||||
// return Arr::get($this->video,'codec');
|
||||
|
||||
default:
|
||||
return parent::__get($key);
|
||||
}
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Jobs\CatalogMove;
|
||||
use App\Media\{Base,Factory};
|
||||
|
||||
class Video extends Abstracted\Catalog
|
||||
@ -60,7 +57,7 @@ class Video extends Abstracted\Catalog
|
||||
/*
|
||||
$x = new \getID3;
|
||||
$x->analyze($this->file_name(FALSE));
|
||||
dump(['id3'=>$x]);
|
||||
dump(['id3'=>$x,'me'=>$this]);
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
"require": {
|
||||
"php": "^8.3",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-imagick": "*",
|
||||
"ext-pdo": "*",
|
||||
"laravel/framework": "^11.0",
|
||||
"laravel/ui": "^4.5",
|
||||
"leenooks/laravel": "^11.1",
|
||||
|
Loading…
Reference in New Issue
Block a user