Cleanup playlists

This commit is contained in:
Pierre Rudloff 2017-04-25 01:53:38 +02:00
parent 3f053d9eed
commit 43cbd4f6fe
10 changed files with 175 additions and 121 deletions

View file

@ -38,7 +38,7 @@ class Config
*
* @var array
*/
public $params = ['--no-playlist', '--no-warnings', '--playlist-end', 1];
public $params = ['--no-warnings'];
/**
* Enable audio conversion.

View file

@ -113,14 +113,7 @@ class VideoDownload
* */
public function getJSON($url, $format = null, $password = null)
{
$jsonArray = preg_split( "/\r|\n/", $this->getProp($url, $format, 'dump-json', $password), -1,
PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$decodedJson = array();
foreach ($jsonArray as $oneJson)
{
array_push($decodedJson, json_decode($oneJson));
}
return $decodedJson;
return json_decode($this->getProp($url, $format, 'dump-single-json', $password));
}
/**