aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-05-25 17:20:36 -0500
committerJesús <heckyel@hyperbola.info>2019-05-25 17:20:36 -0500
commiteb4befd71382f70c9bbbc0d56dc26d5a9a9d6cb4 (patch)
tree852940d2181b98731a3ee1cf012af1b5fc226c29
parentb0f2af18e572f316770a1c7c928933eb3f07b269 (diff)
downloadytlibre-eb4befd71382f70c9bbbc0d56dc26d5a9a9d6cb4.tar.lz
ytlibre-eb4befd71382f70c9bbbc0d56dc26d5a9a9d6cb4.tar.xz
ytlibre-eb4befd71382f70c9bbbc0d56dc26d5a9a9d6cb4.zip
reorganize extract DRM
-rw-r--r--tools/processor.php46
1 files changed, 24 insertions, 22 deletions
diff --git a/tools/processor.php b/tools/processor.php
index 6b18f74..ce24569 100644
--- a/tools/processor.php
+++ b/tools/processor.php
@@ -75,30 +75,32 @@ $downloads = $video_info->formatStreams;
///// Beaking DRM!!!
// Check standar video into URL
$url_standar = video_exists( $streamFormats[0]->url );
-// format video DRM
-$formatdrm = $streamFormats[0]->type;
-
-// nodes
-$node0 = "https://invidio.us/latest_version?id={$video_id}&itag=18&local=true";
-$node1 = "https://invidious.snopyta.org/latest_version?id={$video_id}&itag=18&local=true";
-// explain DRM
-$drmv = "https://archive.org/download/libreweb/rms-drm.webm";
-
-$node0on = video_exists( $node0 );
-$node1on = video_exists( $node1 );
-
-// check nodes
-if ( $node0on === TRUE ) {
- $breakurl = $node0;
-} elseif ( $node1on === TRUE ) {
- $breakurl = $node1;
-} else {
- $breakurl = $drmv;
- $formatdrm = 'video/webm';
-}
if ( $url_standar === FALSE ) {
- // Liberty data
+ // nodes
+ $node0 = "https://invidio.us/latest_version?id={$video_id}&itag=18&local=true";
+ $node1 = "https://invidious.snopyta.org/latest_version?id={$video_id}&itag=18&local=true";
+
+ // explain DRM
+ $drmv = "https://archive.org/download/libreweb/rms-drm.webm";
+
+ $node0on = video_exists( $node0 );
+ $node1on = video_exists( $node1 );
+
+ // format video DRM
+ $formatdrm = $streamFormats[0]->type;
+
+ // check nodes
+ if ( $node0on === TRUE ) {
+ $breakurl = $node0;
+ } elseif ( $node1on === TRUE ) {
+ $breakurl = $node1;
+ } else {
+ $breakurl = $drmv;
+ $formatdrm = 'video/webm';
+ }
+
+ // liberty data
$breakquality = trim( $streamFormats[0]->resolution, 'p' );
$breaklink = <<<EOT
<source data-res="{$breakquality}" src="{$breakurl}" type='{$formatdrm}'/>