Skip to content

A self-hosted media server and file management system

fix: generate audio metadta when file updated

aminnausinc7caa5d3de26
diff --git a/app/Jobs/VerifyFiles.php b/app/Jobs/VerifyFiles.php
index 6616b69c..8d8e0231 100755
--- a/app/Jobs/VerifyFiles.php
+++ b/app/Jobs/VerifyFiles.php
@@ -158,7 +158,7 @@ class VerifyFiles extends ManagedSubTask {
$changes['media_type'] = $media_type;
}
// if file is of type audio and one of the following is true: artist is null, album is null, codec is null, bitrate is null => generate description from audio tags
- $audioMetadata = (is_null($metadata->artist) || is_null($metadata->album) || is_null($metadata->bitrate) || is_null($metadata->codec)) && $is_audio ? $this->getAudioDescription($filePath, $this->fileMetaData ?? null) : [];
+ $audioMetadata = ($fileUpdated || is_null($metadata->artist) || is_null($metadata->album) || is_null($metadata->bitrate) || is_null($metadata->codec)) && $is_audio ? $this->getAudioDescription($filePath, $this->fileMetaData ?? null) : [];
// TODO: if no poster_url is set or file was modified since last update and the file is of type audio, extract image
// TODO: if poster_url is set and it is not a local url, download and save as local image