Move Video class to a separate library

+ improve error handling
+ youtube-dl update
This commit is contained in:
Pierre Rudloff 2020-06-21 01:44:20 +02:00
parent 7d94271a49
commit 5c2823e3f1
30 changed files with 649 additions and 1152 deletions

View file

@ -6,8 +6,8 @@
namespace Alltube\Stream;
use Alltube\Video;
use Exception;
use Alltube\Library\Exception\AlltubeLibraryException;
use Alltube\Library\Video;
use Slim\Http\Stream;
/**
@ -21,11 +21,11 @@ class ConvertedPlaylistArchiveStream extends PlaylistArchiveStream
* @param Video $video Video to stream
*
* @return void
* @throws Exception
* @throws AlltubeLibraryException
*/
protected function startVideoStream(Video $video)
{
$this->curVideoStream = new Stream($video->getAudioStream());
$this->curVideoStream = new Stream($this->downloader->getAudioStream($video));
$this->init_file_stream_transfer(
$video->getFileNameWithExtension('mp3'),