Minor fixes
This commit is contained in:
parent
8c453d7b0e
commit
fe155525a3
@ -45,8 +45,9 @@ class CatalogMove extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
$x = NULL;
|
||||
if (! $o->scanned OR $o->duplicate OR $o->remove OR ($x=$o->moveable()) !== TRUE) {
|
||||
$this->warn(sprintf('Ignoring [%s]...',$o->file_path()));
|
||||
$this->warn(sprintf('Ignoring (%s)[%s]... [%s]',$o->id,$o->file_path(),$x));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ class CatalogScan extends Command
|
||||
$o->setThumbnail();
|
||||
|
||||
// If this is a duplicate
|
||||
$x = $class::whereIN('id',$o->list_duplicate())->get();
|
||||
$x = $o->duplicates()->get();
|
||||
if (count($x)) {
|
||||
foreach ($x as $oo) {
|
||||
// And that photo is not marked as a duplicate
|
||||
|
@ -49,6 +49,11 @@ class VideoController extends Controller
|
||||
|
||||
if ($o->remove AND $request->input('remove.'.$id))
|
||||
$this->dispatch((new VideoDelete($o))->onQueue('delete'));
|
||||
|
||||
elseif (! $o->remove) {
|
||||
$o->remove = TRUE;
|
||||
$o->save();
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->action('VideoController@deletes',$request->input('pagenext') ? '?page='.$request->input('pagenext') : NULL);
|
||||
|
@ -263,6 +263,7 @@ abstract class Catalog extends Model
|
||||
/**
|
||||
* Return the object type
|
||||
* @return string
|
||||
* @deprecated Use objecttype()
|
||||
*/
|
||||
public function getTypeAttribute(): string
|
||||
{
|
||||
|
@ -181,13 +181,16 @@ class Photo extends Abstracted\Catalog
|
||||
|
||||
public function setMakeModel()
|
||||
{
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('exif:Make') ?: NULL,
|
||||
]);
|
||||
$ma = NULL;
|
||||
|
||||
if ($this->property('exif:Make'))
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('exif:Make'),
|
||||
]);
|
||||
|
||||
$mo = Model::firstOrCreate([
|
||||
'name'=>$this->property('exif:Model') ?: NULL,
|
||||
'make_id'=>$ma->id,
|
||||
'make_id'=>$ma ? $ma->id : NULL,
|
||||
]);
|
||||
|
||||
$so = Software::firstOrCreate([
|
||||
|
@ -143,13 +143,16 @@ class Video extends Abstracted\Catalog
|
||||
|
||||
public function setMakeModel()
|
||||
{
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('make') ?: NULL,
|
||||
]);
|
||||
$ma = NULL;
|
||||
|
||||
if ($this->property('make'))
|
||||
$ma = Make::firstOrCreate([
|
||||
'name'=>$this->property('make'),
|
||||
]);
|
||||
|
||||
$mo = Model::firstOrCreate([
|
||||
'name'=>$this->property('model') ?: NULL,
|
||||
'make_id'=>$ma->id,
|
||||
'make_id'=>$ma ? $ma->id : NULL,
|
||||
]);
|
||||
|
||||
$so = Software::firstOrCreate([
|
||||
|
Loading…
Reference in New Issue
Block a user