diff --git a/html/lmbrowse.php b/html/lmbrowse.php index 8660222..8a9f295 100644 --- a/html/lmbrowse.php +++ b/html/lmbrowse.php @@ -1,13 +1,13 @@ // $RCSfile: lmbrowse.php,v $ -// $Revision: 1.19 $ -// $Name: $ -// $Date: 2016/05/05 16:17:29 $ +// $Revision: 1.17 $ +// $Name: lmbrowse-1_6_0-1 $ +// $Date: 2016/03/21 16:07:30 $ // $Author: agibert $ /* * LMBrowse - Langueur Monotone Browser - * Copyright (C) 2012-2015 Arnaud G. GIBERT + * Copyright (C) 2012-2018 Arnaud G. GIBERT * mailto:arnaud@rx3.net * http://www.rx3.org/dvp/lmbrowse * @@ -42,7 +42,7 @@ $time_start = microtime_float(); include "lmbrowse_config.inc"; $lmb_myname="LMBrowse"; -$lmb_tag_tab=explode( " ", "\$Name: $"); +$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_6_0-1 $"); $lmb_tag_tab=explode( "-", $lmb_tag_tab[1]); $lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", "."); @@ -172,6 +172,7 @@ function lmb_cookies_load() global $lmb_cookie_tab; + lmb_cookie_load( "video_res", "1080p"); lmb_cookie_load( "jpsolution", "html, flash"); lmb_cookie_load( "admin", ""); } @@ -268,7 +269,7 @@ function lmb_admin_update() function lmb_size_convert( $size) { - $unit_tab = array( "b", "Kb", "Mb"); + $unit_tab = array( "b", "Kb", "Mb", "Gb"); for( $i = 0; $size > 1024; $i++) @@ -981,6 +982,53 @@ function lmb_news_tab_get( ) +/*--------------------------------------------------------------------------------------------------------------------*/ +/* News JSON-LD */ +/*--------------------------------------------------------------------------------------------------------------------*/ + +function lmb_news_json_ld( $news_tab) +{ + global $lmb_url_post; + + + for( $i=0; $i < count($news_tab); $i++) + { + + echo " +"; + + } +} + + /*--------------------------------------------------------------------------------------------------------------------*/ /* News Tab */ /*--------------------------------------------------------------------------------------------------------------------*/ @@ -992,6 +1040,8 @@ function lmb_news_tab( $skin_path) $news_tab = lmb_news_tab_get(); + lmb_news_json_ld( $news_tab); + ob_start(); for( $i=0; $i < count($news_tab); $i++) @@ -2333,9 +2383,9 @@ function lmb_video_file_tab_get( $play_type, $play_id, $play_priority, $video_id { if( $mode == "MULTI") { - $file_tab[$i]["url"] = "{$lmb_url_post}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=video&vformat={$video_format}"; + $file_tab[$i]["url"] = "{$lmb_url_post}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=video&vformat={$video_format}.{$video_codec}"; - $file_size = lmb_download_videos( $play_type, $play_id, $play_priority, $video_format, "SIZE"); + $file_size = lmb_download_videos( $play_type, $play_id, $play_priority, "{$video_format}.{$video_codec}", "SIZE"); $size_tab = lmb_size_convert( $file_size); } else @@ -2416,7 +2466,7 @@ function lmb_videolist( $play_type, $play_id, $play_priority, $skin_path) ob_start(); - $cmd="ls {$video_path}/* | sed -e 's/.*\.//' | grep -v \"png\" | sort -ru"; + $cmd="ls {$video_path}/* | sed -e 's/.*\.//' | grep -v \"png\" | sort -u"; exec($cmd, $codec_tab); if( count( $codec_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is())) @@ -3490,6 +3540,7 @@ function lmb_track_video( $play_type, $play_id, $play_priority, $track_id, $trac $video_res_cookie = "video_res"; $prefix_url = "{$lmb_url_post}?cookie_id={$video_res_cookie}&cookie_value="; $query_string = preg_replace( "/cookie_id={$video_res_cookie}&cookie_value=[^&]*&/", "", "{$_SERVER['QUERY_STRING']}"); + $video_res_1440p_url = htmlentities( "{$prefix_url}1440p&{$query_string}"); $video_res_1080p_url = htmlentities( "{$prefix_url}1080p&{$query_string}"); $video_res_720p_url = htmlentities( "{$prefix_url}720p&{$query_string}"); $video_res_360p_url = htmlentities( "{$prefix_url}360p&{$query_string}"); @@ -3498,15 +3549,21 @@ function lmb_track_video( $play_type, $play_id, $play_priority, $track_id, $trac $video_res_tab = array(); - if( "{$video_res}" == "") - { - $video_res = "1080p"; - } - switch("{$video_res}") { + case "1440p": + { + $video_res_1440p_class = "link-item-disabled"; + $video_res_1080p_class = "link-item"; + $video_res_720p_class = "link-item"; + $video_res_360p_class = "link-item"; + + break; + } + case "1080p": { + $video_res_1440p_class = "link-item"; $video_res_1080p_class = "link-item-disabled"; $video_res_720p_class = "link-item"; $video_res_360p_class = "link-item"; @@ -3516,6 +3573,7 @@ function lmb_track_video( $play_type, $play_id, $play_priority, $track_id, $trac case "720p": { + $video_res_1440p_class = "link-item"; $video_res_1080p_class = "link-item"; $video_res_720p_class = "link-item-disabled"; $video_res_360p_class = "link-item"; @@ -3525,6 +3583,7 @@ function lmb_track_video( $play_type, $play_id, $play_priority, $track_id, $trac case "360p": { + $video_res_1440p_class = "link-item"; $video_res_1080p_class = "link-item"; $video_res_720p_class = "link-item"; $video_res_360p_class = "link-item-disabled"; @@ -3573,7 +3632,7 @@ Your browser does not support the video tag.