mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +00:00
21 lines
490 B
PHP
21 lines
490 B
PHP
<?php
|
|
|
|
namespace App\Services\Streamer\Adapters;
|
|
|
|
use App\Models\Song;
|
|
use App\Services\SongStorages\SftpStorage;
|
|
use App\Services\Streamer\Adapters\Concerns\StreamsLocalPath;
|
|
|
|
class SftpStreamerAdapter implements StreamerAdapter
|
|
{
|
|
use StreamsLocalPath;
|
|
|
|
public function __construct(private readonly SftpStorage $storage)
|
|
{
|
|
}
|
|
|
|
public function stream(Song $song, array $config = []): void
|
|
{
|
|
$this->streamLocalPath($this->storage->copyToLocal($song));
|
|
}
|
|
}
|