aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-05-28 19:23:05 -0500
committerJesús <heckyel@hyperbola.info>2019-05-28 19:23:05 -0500
commit05fa28ed9563421b75f3f41af828288b28bf2a23 (patch)
treeb4e562534cd4a9a14a57abdf46cbd2af96d25e89
parentab9577d3167a2d5dac6b72775ec36b648f249c76 (diff)
downloadytlibre-05fa28ed9563421b75f3f41af828288b28bf2a23.tar.lz
ytlibre-05fa28ed9563421b75f3f41af828288b28bf2a23.tar.xz
ytlibre-05fa28ed9563421b75f3f41af828288b28bf2a23.zip
revert play with mpv
mpv require youtube-dl or hypervideo for play video.
-rw-r--r--index.php18
-rw-r--r--templates/video.tpl3
-rw-r--r--tools/processor.php12
3 files changed, 14 insertions, 19 deletions
diff --git a/index.php b/index.php
index b847e75..95f5817 100644
--- a/index.php
+++ b/index.php
@@ -50,6 +50,7 @@ if (empty($_GET['link'])){
$video_decode->assign("formatdrm", $formatdrm);
// Base link
+ $video_decode->assign("local_url", $local_url);
$video_decode->assign("baselink", $baselink);
/* ---- ---- CSS ---- ---- */
@@ -63,22 +64,5 @@ if (empty($_GET['link'])){
$video_decode->assign('javascript', array('plyr' => 'templates/libs/plyr/plyr.min.js')
);
- /* ---- ---- Embed ---- ---- */
- if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
- $pro = 'https';
- } else {
- $pro = 'http';
- }
-
- $subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
-
- // Local URL
- $local_url = preg_replace('/index.php/', '', $subject);
-
- // Assign variables
- $video_decode->assign("local_url", $local_url);
-
- /* ---- ---- END ---- --- */
-
$video_decode->display('templates/video.tpl');
}
diff --git a/templates/video.tpl b/templates/video.tpl
index 8ce2578..fdae3d2 100644
--- a/templates/video.tpl
+++ b/templates/video.tpl
@@ -141,8 +141,7 @@
<!--EndPlyr-->
</div>
</section>
- <h4 class="mpv">Play with MPV</h4>
- <code>mpv '{$local_url}?link={$baselink}'</code>
+ <code>{$baselink}</code>
<code>
&lt;iframe width='560' height='315' src='{$local_url}embed?link={$baselink}' frameborder='0' scrolling='no'&gt;&lt;/iframe&gt;
</code>
diff --git a/tools/processor.php b/tools/processor.php
index 79470ee..5eb03e1 100644
--- a/tools/processor.php
+++ b/tools/processor.php
@@ -117,3 +117,15 @@ if ( $url_standar === FALSE ) {
$formatdrm = NULL;
}
///// End Beaking DRM!!!
+
+/* ---- ---- Generated baselink and embed ---- ---- */
+if ( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on" ) {
+ $pro = 'https';
+} else {
+ $pro = 'http';
+}
+
+$subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
+
+// Local URL
+$local_url = preg_replace( '/index.php/', '', $subject );