Skip to content

A self-hosted media server and file management system

pint

aminnausin4355e77f19c9
diff --git a/app/Jobs/EmbedUidInMetadata.php b/app/Jobs/EmbedUidInMetadata.php
index c08bc92f..b186d043 100644
--- a/app/Jobs/EmbedUidInMetadata.php
+++ b/app/Jobs/EmbedUidInMetadata.php
@@ -148,6 +148,7 @@ class EmbedUidInMetadata implements ShouldQueue {
if ($ext === 'mp4') {
try {
$this->addMetadataWithExifTool();
+
return ' ExifTool';
} catch (\Exception $e) {
dump('ExifTool failed, falling back to ffmpeg: ' . $e->getMessage());
@@ -169,7 +170,7 @@ class EmbedUidInMetadata implements ShouldQueue {
$command = [
'exiftool',
- '-encoder=' . $this->uuid, //ExifTool sucks and can't write a custom tag into files like ffmpeg so I have to use encoder
+ '-encoder=' . $this->uuid, // ExifTool sucks and can't write a custom tag into files like ffmpeg so I have to use encoder
'-preserve',
'-overwrite_original',
$this->filePath,
diff --git a/app/Jobs/IndexFiles.php b/app/Jobs/IndexFiles.php
index 051bc377..a985d4b3 100755
--- a/app/Jobs/IndexFiles.php
+++ b/app/Jobs/IndexFiles.php
@@ -600,5 +600,4 @@ class IndexFiles implements ShouldBeUnique, ShouldQueue {
}
}
}
-class BatchCancelledException extends \Exception {
-}
+class BatchCancelledException extends \Exception {}
diff --git a/app/Jobs/VerifyFiles.php b/app/Jobs/VerifyFiles.php
index 5e789fb2..bf2c91d3 100755
--- a/app/Jobs/VerifyFiles.php
+++ b/app/Jobs/VerifyFiles.php
@@ -321,8 +321,13 @@ class VerifyFiles implements ShouldQueue {
$metadata['format'] = $metadata['streams'][0] ?? [];
}
- if (!isset($metadata['format']['tags']['uuid']) && isset($metadata['format']['tags']['uid'])) $metadata['format']['tags']['uuid'] = $metadata['format']['tags']['uid']; // old uid tag
- if (!isset($metadata['format']['tags']['uuid']) && isset($metadata['format']['tags']['encoder']) && uuid_is_valid($metadata['format']['tags']['encoder'])) $metadata['format']['tags']['uuid'] = $metadata['format']['tags']['encoder']; // ExifTool tag
+ if (! isset($metadata['format']['tags']['uuid']) && isset($metadata['format']['tags']['uid'])) {
+ $metadata['format']['tags']['uuid'] = $metadata['format']['tags']['uid'];
+ } // old uid tag
+ if (! isset($metadata['format']['tags']['uuid']) && isset($metadata['format']['tags']['encoder']) && uuid_is_valid($metadata['format']['tags']['encoder'])) {
+ $metadata['format']['tags']['uuid'] = $metadata['format']['tags']['encoder'];
+ } // ExifTool tag
+
return $metadata['format'];
} catch (\Throwable $th) {
dump($th);