koel/app/Services/TranscodingService.php

21 lines
340 B
PHP
Raw Normal View History

2018-08-22 19:13:45 +00:00
<?php
namespace App\Services;
use App\Models\Song;
class TranscodingService
{
/**
* Determine if a song should be transcoded.
*
* @param Song $song
*
* @return bool
*/
public function songShouldBeTranscoded(Song $song)
{
return ends_with(mime_content_type($song->path), 'flac');
}
}