Cleanup playlists
This commit is contained in:
parent
3f053d9eed
commit
43cbd4f6fe
10 changed files with 175 additions and 121 deletions
|
@ -38,7 +38,7 @@ class Config
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $params = ['--no-playlist', '--no-warnings', '--playlist-end', 1];
|
||||
public $params = ['--no-warnings'];
|
||||
|
||||
/**
|
||||
* Enable audio conversion.
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue