Merge branch 'develop' of https://github.com/hukoeth/alltube into feature/playlist

Conflicts:
	templates/video.tpl
This commit is contained in:
Pierre Rudloff 2017-04-25 01:14:21 +02:00
commit 3f053d9eed
5 changed files with 117 additions and 104 deletions

View file

@ -113,7 +113,14 @@ class VideoDownload
* */
public function getJSON($url, $format = null, $password = null)
{
return json_decode($this->getProp($url, $format, 'dump-json', $password));
$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;
}
/**