feat: Add env TRANSCODE_FLAC (default true) to toggle transcoding on/off for FLAC files (#1458)

Co-authored-by: CoUsT <gitea@coust.cloud>
This commit is contained in:
MaciejGorczyca 2022-10-08 12:49:50 +02:00 committed by GitHub
parent 31bf152b87
commit 279f23d4e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,6 @@ class TranscodingService
{
public function songShouldBeTranscoded(Song $song): bool
{
return ends_with(mime_content_type($song->path), 'flac');
return ends_with(mime_content_type($song->path), 'flac') && config('koel.streaming.transcode_flac');
}
}

View file

@ -37,6 +37,7 @@ return [
'bitrate' => env('OUTPUT_BIT_RATE', 128),
'method' => env('STREAMING_METHOD'),
'ffmpeg_path' => env('FFMPEG_PATH'),
'transcode_flac' => env('TRANSCODE_FLAC', true),
],
/*