File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
osse-core/app/Services/MusicProcessor Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22
33namespace App \Services \MusicProcessor ;
44
5+ use Illuminate \Support \Facades \Log ;
56use Illuminate \Support \Facades \Storage ;
67use Kiwilan \Audio \Models \AudioCover ;
78use SplFileInfo ;
@@ -29,10 +30,14 @@ private function generateHash(): string
2930 public function storeFile (): void
3031 {
3132 if ($ this ->file instanceof SplFileInfo) {
32- Storage::disk (config ('scan.cover_art_disk ' ))->put ('cover-art/ ' .$ this ->hash , file_get_contents ($ this ->file ->getRealPath ()));
33+ if (!Storage::disk (config ('scan.cover_art_disk ' ))->put ('cover-art/ ' .$ this ->hash , file_get_contents ($ this ->file ->getRealPath ()))) {
34+ Log::warning ('Failed to store album art for ' . $ this ->trackFilePath );
35+ }
3336 $ this ->mimeType = Storage::disk (config ('scan.cover_art_disk ' ))->mimeType ('cover-art/ ' .$ this ->hash ) ?? null ;
3437 } else {
35- Storage::disk (config ('scan.cover_art_disk ' ))->put ('cover-art/ ' .$ this ->hash , $ this ->file ->getContents ());
38+ if (!Storage::disk (config ('scan.cover_art_disk ' ))->put ('cover-art/ ' .$ this ->hash , $ this ->file ->getContents ())) {
39+ Log::warning ('Failed to store album art for ' . $ this ->trackFilePath );
40+ }
3641 $ this ->mimeType = $ this ->file ->getMimeType ();
3742 }
3843 }
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ generate_caddy() {
7272 sed -i " s+WEB_FRONTEND_TEMPLATE+$REPLACE +" Caddyfile
7373
7474 # Use localhost in prod, broadcast container in docker.
75- if [[ -v $OSSE_DOCKER_PORT ] ]; then
75+ if [ -z $OSSE_DOCKER_PORT ]; then
7676 REPLACE=" reverse_proxy 127.0.0.1:${OSSE_BROADCAST_PORT} "
7777 else
7878 REPLACE=" reverse_proxy broadcast:${OSSE_BROADCAST_PORT} "
You can’t perform that action at this time.
0 commit comments