Simplify PSR-4 autoload
This commit is contained in:
parent
65ccf95437
commit
d127964eff
12 changed files with 81 additions and 84 deletions
36
classes/Stream/ConvertedPlaylistArchiveStream.php
Normal file
36
classes/Stream/ConvertedPlaylistArchiveStream.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ConvertedPlaylistArchiveStream class.
|
||||
*/
|
||||
|
||||
namespace Alltube\Stream;
|
||||
|
||||
use Alltube\Library\Exception\AlltubeLibraryException;
|
||||
use Alltube\Library\Video;
|
||||
use Slim\Http\Stream;
|
||||
|
||||
/**
|
||||
* Class used to create a Zip archive from converted playlists entries.
|
||||
*/
|
||||
class ConvertedPlaylistArchiveStream extends PlaylistArchiveStream
|
||||
{
|
||||
/**
|
||||
* Start streaming a new video.
|
||||
*
|
||||
* @param Video $video Video to stream
|
||||
*
|
||||
* @return void
|
||||
* @throws AlltubeLibraryException
|
||||
*/
|
||||
protected function startVideoStream(Video $video)
|
||||
{
|
||||
$this->curVideoStream = new Stream($this->downloader->getAudioStream($video));
|
||||
|
||||
$this->init_file_stream_transfer(
|
||||
$video->getFileNameWithExtension('mp3'),
|
||||
// The ZIP format does not care about the file size.
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue