diff options
author | Jesús <heckyel@hyperbola.info> | 2021-01-16 00:04:21 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-01-16 00:04:21 -0500 |
commit | 8cd5713c496aff7f2f5880c01562627da1d7f156 (patch) | |
tree | d451c15356748c4520b907aed1e913a67bc48f78 | |
parent | 0f994b7555d03af75dd2fef578aacca4d9139d9d (diff) | |
download | ytexplode-8cd5713c496aff7f2f5880c01562627da1d7f156.tar.lz ytexplode-8cd5713c496aff7f2f5880c01562627da1d7f156.tar.xz ytexplode-8cd5713c496aff7f2f5880c01562627da1d7f156.zip |
Fix json_encode and add size
-rw-r--r-- | index.php | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -470,7 +470,8 @@ if (isset($_GET['id'])) { 'fps' => $stream['fps'], 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], - 'format' => exformat($stream['itag']) + 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vdef, $values); } else { @@ -500,6 +501,7 @@ if (isset($_GET['id'])) { 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vid, $values); } @@ -537,13 +539,14 @@ if (isset($_GET['id'])) { 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vid, $values); } } } $json['adaptiveFormats'] = array_merge($vid, $aud); - $json['formatStreams']=$vdef; + $json['formatStreams'] = $vdef; // $json['audio']=$aud; // $json['video']=$vid; } else { @@ -552,12 +555,12 @@ if (isset($_GET['id'])) { $vid = array(); $json['adaptiveFormats'] = array_merge($vid, $aud); - $json['formatStreams']=$vdef; + $json['formatStreams'] = $vdef; // $json['audio']=$aud; // $json['video']=$vid; } - - echo json_encode($json, JSON_FORCE_OBJECT); + // echo json_encode($json, JSON_FORCE_OBJECT); + echo json_encode($json); // echo json_encode($streamin_data_json, JSON_FORCE_OBJECT); } else { $json = array( |