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,9 +6,9 @@
namespace Alltube\Test;
use Alltube\Config;
use Alltube\Exception\ConfigException;
use Alltube\Stream\PlaylistArchiveStream;
use Alltube\Video;
use Exception;
/**
* Unit tests for the PlaylistArchiveStream class.
@ -18,14 +18,16 @@ class PlaylistArchiveStreamTest extends StreamTest
{
/**
* Prepare tests.
* @throws Exception
* @throws ConfigException
*/
protected function setUp(): void
{
parent::setUp();
$video = new Video('https://www.youtube.com/playlist?list=PL1j4Ff8cAqPu5iowaeUAY8lRgkfT4RybJ');
$config = Config::getInstance();
$downloader = $config->getDownloader();
$video = $downloader->getVideo('https://www.youtube.com/playlist?list=PL1j4Ff8cAqPu5iowaeUAY8lRgkfT4RybJ');
$this->stream = new PlaylistArchiveStream($video);
$this->stream = new PlaylistArchiveStream($downloader, $video);
}
}