- Add docker support,
- Add cache support for zip file size, - Remove obsolete JPlayer.
This commit is contained in:
@@ -27,7 +27,7 @@ ARG LMBROWSE_CONFIG_NAME=lmbrowse_config.inc
|
|||||||
ARG LMBROWSE_CONFIG_FILE=/etc/lmbrowse/lmbrowse_config.inc
|
ARG LMBROWSE_CONFIG_FILE=/etc/lmbrowse/lmbrowse_config.inc
|
||||||
ARG LMBROWSE_SHARE_DIR=/usr/share/lmbrowse
|
ARG LMBROWSE_SHARE_DIR=/usr/share/lmbrowse
|
||||||
ARG LMBROWSE_WWW_DIR=/var/www/lmbrowse
|
ARG LMBROWSE_WWW_DIR=/var/www/lmbrowse
|
||||||
ARG LMBROWSE_LINKS="about.txt history.txt news.txt welcome.txt discography fonts skin skins tracks"
|
ARG LMBROWSE_LINKS="about.txt history.txt news.txt welcome.txt discography .links fonts skin skins tracks"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ COPY ${MODULE_PATH}/html ${LMBR
|
|||||||
|
|
||||||
RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \
|
RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \
|
||||||
&& urpmi.update -a \
|
&& urpmi.update -a \
|
||||||
&& urpmi --force flac \
|
&& urpmi --force flac zip \
|
||||||
&& sed -i -e "s%Alias /lmbrowse/%Alias LMBROWSE_URL%" ${LMBROWSE_HTTPD_CONFIG_FILE}.ref \
|
&& sed -i -e "s%Alias /lmbrowse/%Alias LMBROWSE_URL%" ${LMBROWSE_HTTPD_CONFIG_FILE}.ref \
|
||||||
&& mv ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME}.ref \
|
&& mv ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME}.ref \
|
||||||
&& ln -s ${LMBROWSE_CONFIG_FILE} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} \
|
&& ln -s ${LMBROWSE_CONFIG_FILE} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} \
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LMBrowse V 1.9.1 - A. GIBERT - 2026/07/??
|
LMBrowse V 1.9.1 - A. GIBERT - 2026/07/13
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Add docker support,
|
- Add docker support,
|
||||||
|
- Add cache support for zip file size,
|
||||||
- Remove obsolete JPlayer.
|
- Remove obsolete JPlayer.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
0
src/html/.links
Normal file
0
src/html/.links
Normal file
@@ -1,3 +1,3 @@
|
|||||||
This is the About text !
|
This is the About text!
|
||||||
|
|
||||||
Bye Bye...
|
Bye Bye...
|
||||||
|
|||||||
1
src/html/history.txt
Normal file
1
src/html/history.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is the History text!
|
||||||
@@ -1,24 +1,27 @@
|
|||||||
<?
|
<?
|
||||||
/*
|
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
* LMBrowse - Langueur Monotone Browser
|
/* */
|
||||||
* Copyright (C) 2012-2026 Arnaud G. GIBERT
|
/* LMBrowse - Langueur Monotone Browser */
|
||||||
* mailto:arnaud@rx3.net
|
/* */
|
||||||
* http://www.rx3.org/dvp/lmbrowse
|
/* Copyright (C) 2012-2026 Arnaud G. GIBERT */
|
||||||
*
|
/* mailto:arnaud@rx3.net */
|
||||||
* This program is free software; you can redistribute it and/or
|
/* http://www.rx3.org/dvp/lmbrowse */
|
||||||
* modify it under the terms of the GNU General Public License
|
/* */
|
||||||
* as published by the Free Software Foundation; either version 2
|
/* This is free software: you can redistribute it and/or modify it */
|
||||||
* of the License, or any later version.
|
/* under the terms of the GNU Lesser General Public License as published */
|
||||||
*
|
/* by the Free Software Foundation, either version 3 of the License, or */
|
||||||
* This program is distributed in the hope that it will be useful,
|
/* (at your option) any later version. */
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
/* */
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
* GNU General Public License for more details.
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
*
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
* You should have received a copy of the GNU General Public License
|
/* GNU Lesser General Public License for more details. */
|
||||||
* along with this program; if not, write to the Free Software
|
/* */
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
/* You should have received a copy of the GNU Lesser General Public */
|
||||||
*/
|
/* License along with this program; If not, see */
|
||||||
|
/* <https://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ $time_start = microtime_float();
|
|||||||
include "lmbrowse_config.inc";
|
include "lmbrowse_config.inc";
|
||||||
|
|
||||||
$lmb_myname="LMBrowse";
|
$lmb_myname="LMBrowse";
|
||||||
$lmb_myver="1.9.0-1";
|
$lmb_myver="1.9.1-1";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -166,7 +169,7 @@ function lmb_cookies_load()
|
|||||||
|
|
||||||
|
|
||||||
lmb_cookie_load( "video_res", "1080p");
|
lmb_cookie_load( "video_res", "1080p");
|
||||||
lmb_cookie_load( "jpsolution", "native");
|
// lmb_cookie_load( "jpsolution", "native");
|
||||||
lmb_cookie_load( "admin", "");
|
lmb_cookie_load( "admin", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +461,7 @@ function lmb_make_tab( $tab_id, $css_id, $tab_side, $logo_path, $img_path, $data
|
|||||||
|
|
||||||
if( $logo_path[0] == "/")
|
if( $logo_path[0] == "/")
|
||||||
{
|
{
|
||||||
if( $img_path[0] == "/")
|
if( $img_path != "")
|
||||||
{
|
{
|
||||||
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img class=\"button-item\" src=\"{$logo_path}\" alt=\"\" onclick=\"openModal('{$img_path}')\" style=\"cursor:pointer\"/></td>";
|
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img class=\"button-item\" src=\"{$logo_path}\" alt=\"\" onclick=\"openModal('{$img_path}')\" style=\"cursor:pointer\"/></td>";
|
||||||
}
|
}
|
||||||
@@ -666,7 +669,6 @@ function lmb_header( $page_id, $page_name, $page_title, $description, $keywords,
|
|||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>
|
||||||
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{$skin_path}/images/favicon.ico\"/>
|
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{$skin_path}/images/favicon.ico\"/>
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skin_path}/default.css\"/>
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skin_path}/default.css\"/>
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/skin/pink.flag/css/jplayer.pink.flag.css\"/>
|
|
||||||
<title>$page_name</title>
|
<title>$page_name</title>
|
||||||
";
|
";
|
||||||
|
|
||||||
@@ -1261,7 +1263,7 @@ function lmb_sitemap_play( $play_type, $play_id, $play_priority)
|
|||||||
if( ! file_exists( "{$extra_path}/.hide" ))
|
if( ! file_exists( "{$extra_path}/.hide" ))
|
||||||
{
|
{
|
||||||
$cmd = "ls {$extra_path}/{$play_id}-*.png | sed -e 's/.*{$play_id}-//' | grep -v icon.png | sort ";
|
$cmd = "ls {$extra_path}/{$play_id}-*.png | sed -e 's/.*{$play_id}-//' | grep -v icon.png | sort ";
|
||||||
exec($cmd, $extra_tab);
|
exec( $cmd, $extra_tab);
|
||||||
|
|
||||||
for( $i = 0, $j = 1; $i < count($extra_tab); $i++, $j++)
|
for( $i = 0, $j = 1; $i < count($extra_tab); $i++, $j++)
|
||||||
{
|
{
|
||||||
@@ -1300,7 +1302,7 @@ function lmb_sitemap_play_type( $play_type)
|
|||||||
$line = array();
|
$line = array();
|
||||||
$cmd = "ls -d {$path}/??-* | sed -e 's/.*\///'";
|
$cmd = "ls -d {$path}/??-* | sed -e 's/.*\///'";
|
||||||
|
|
||||||
exec($cmd, $line);
|
exec( $cmd, $line);
|
||||||
|
|
||||||
for( $i = 0; $i < count($line); $i++)
|
for( $i = 0; $i < count($line); $i++)
|
||||||
{
|
{
|
||||||
@@ -1896,7 +1898,7 @@ function lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id)
|
|||||||
$cmd="eval \$( metaflac --export-tags-to=- \"${track_file}\" | grep -v -e \".* .*=\" -e \".*-.*=\" | sed -e 's/=/=\\\"/' -e 's/$/\"/')
|
$cmd="eval \$( metaflac --export-tags-to=- \"${track_file}\" | grep -v -e \".* .*=\" -e \".*-.*=\" | sed -e 's/=/=\\\"/' -e 's/$/\"/')
|
||||||
echo -e \"\${TRACKNUMBER}\t\$(basename ${track_file} .flac)\t\${ARTIST}\t\${ALBUM}\t\$(echo \${TITLE} | sed 's/ (.*//')\t\$(echo \${TITLE} | sed -e 's/.* (//' -e 's/)$//')\t\${COMPOSER}\t\${COMMENT}\t\$(metaflac --show-sample-rate \"${track_file}\")\t\$(metaflac --show-total-samples \"${track_file}\")\t\${SAFECREATIVE}\"";
|
echo -e \"\${TRACKNUMBER}\t\$(basename ${track_file} .flac)\t\${ARTIST}\t\${ALBUM}\t\$(echo \${TITLE} | sed 's/ (.*//')\t\$(echo \${TITLE} | sed -e 's/.* (//' -e 's/)$//')\t\${COMPOSER}\t\${COMMENT}\t\$(metaflac --show-sample-rate \"${track_file}\")\t\$(metaflac --show-total-samples \"${track_file}\")\t\${SAFECREATIVE}\"";
|
||||||
|
|
||||||
exec($cmd, $line);
|
exec( $cmd, $line);
|
||||||
|
|
||||||
$tab = explode( "\t", $line[0]);
|
$tab = explode( "\t", $line[0]);
|
||||||
|
|
||||||
@@ -2303,7 +2305,7 @@ function lmb_coverlist( $play_type, $play_id, $play_priority, $skin_path)
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$cmd="ls {$cover_path}-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*-//'";
|
$cmd="ls {$cover_path}-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*-//'";
|
||||||
exec($cmd, $sheet_tab);
|
exec( $cmd, $sheet_tab);
|
||||||
|
|
||||||
$size=count($sheet_tab) + 1;
|
$size=count($sheet_tab) + 1;
|
||||||
// $height=220/$size;
|
// $height=220/$size;
|
||||||
@@ -2372,7 +2374,7 @@ function lmb_video_file_tab_get( $play_type, $play_id, $play_priority, $video_id
|
|||||||
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
$video_path = "{$play_path}/videos";
|
$video_path = "{$play_path}/videos";
|
||||||
|
|
||||||
$cmd = "ls {$video_path}/{$video_id}* | sed -e 's/.*-//' -e 's/\..*$//' | grep -v icon | grep -v poster | sort -rnu";
|
$cmd = "ls {$video_path}/{$video_id}* 2>/dev/null | sed -e 's/.*-//' -e 's/\..*$//' | grep -v icon | grep -v poster | sort -rnu";
|
||||||
exec( $cmd, $video_format_tab);
|
exec( $cmd, $video_format_tab);
|
||||||
|
|
||||||
$file_tab = array();
|
$file_tab = array();
|
||||||
@@ -2470,8 +2472,8 @@ function lmb_videolist( $play_type, $play_id, $play_priority, $skin_path)
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$cmd="ls {$video_path}/* | sed -e 's/.*\.//' | grep -v \"png\" | sort -u";
|
$cmd="ls {$video_path}/* 2>/dev/null | sed -e 's/.*\.//' | grep -v \"png\" | sort -u";
|
||||||
exec($cmd, $codec_tab);
|
exec( $cmd, $codec_tab);
|
||||||
|
|
||||||
if( count( $codec_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is()))
|
if( count( $codec_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is()))
|
||||||
{
|
{
|
||||||
@@ -2509,7 +2511,7 @@ ${title_tag} <td class=\"videos4\">&nbs
|
|||||||
|
|
||||||
|
|
||||||
$cmd="ls {$video_path}/* | grep -v -- -icon | grep -v -- -poster | sed -e 's/-[0-9][0-9]*p//' -e 's/.*\///' | sort -u";
|
$cmd="ls {$video_path}/* | grep -v -- -icon | grep -v -- -poster | sed -e 's/-[0-9][0-9]*p//' -e 's/.*\///' | sort -u";
|
||||||
exec($cmd, $video_tab);
|
exec( $cmd, $video_tab);
|
||||||
|
|
||||||
$height = max( 86, ( ( 220 - 30 * $codec_nb) / count($video_tab)));
|
$height = max( 86, ( ( 220 - 30 * $codec_nb) / count($video_tab)));
|
||||||
|
|
||||||
@@ -2622,7 +2624,7 @@ function lmb_extralist( $play_type, $play_id, $play_priority, $skin_path)
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -u";
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -u";
|
||||||
exec($cmd, $format_tab);
|
exec( $cmd, $format_tab);
|
||||||
|
|
||||||
if( count($format_tab) == 0 || ( file_exists( "{$extra_path}/.hide" ) && ! lmb_admin_is()))
|
if( count($format_tab) == 0 || ( file_exists( "{$extra_path}/.hide" ) && ! lmb_admin_is()))
|
||||||
{
|
{
|
||||||
@@ -2661,7 +2663,7 @@ ${title_tag} <td class=\"extras4\">&nbs
|
|||||||
|
|
||||||
|
|
||||||
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-//' | sort ";
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-//' | sort ";
|
||||||
exec($cmd, $extra_tab);
|
exec( $cmd, $extra_tab);
|
||||||
|
|
||||||
$height = max( 86, ( ( 220 - 30 * $format_nb) / count($extra_tab)));
|
$height = max( 86, ( ( 220 - 30 * $format_nb) / count($extra_tab)));
|
||||||
|
|
||||||
@@ -2944,7 +2946,8 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
|
|||||||
$play_name = lmb_play_type_name_get( $play_type);
|
$play_name = lmb_play_type_name_get( $play_type);
|
||||||
$skin_path = "{$play_path}/skin";
|
$skin_path = "{$play_path}/skin";
|
||||||
|
|
||||||
|
lmb_cache_test( $play_path);
|
||||||
|
|
||||||
lmb_header( 3, "Langueur Monotone - {$play_title} Page", "{$play_title}", "Langueur Monotone play page, giving all the information about {$play_info["name"]} {$play_name}", "{$play_type},{$play_info["name"]}", 0, "{$skin_path}");
|
lmb_header( 3, "Langueur Monotone - {$play_title} Page", "{$play_title}", "Langueur Monotone play page, giving all the information about {$play_info["name"]} {$play_name}", "{$play_type},{$play_info["name"]}", 0, "{$skin_path}");
|
||||||
lmb_play_body( $play_type, $play_id, $play_priority, $skin_path);
|
lmb_play_body( $play_type, $play_id, $play_priority, $skin_path);
|
||||||
lmb_footer( $skin_path);
|
lmb_footer( $skin_path);
|
||||||
@@ -2958,7 +2961,7 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
|
|||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Track List Page */
|
/* Track List Body */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
function lmb_tracklist_body( $skin_path)
|
function lmb_tracklist_body( $skin_path)
|
||||||
@@ -3218,10 +3221,10 @@ function lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id)
|
|||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* JPlayer Insert */
|
/* Player Insert */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
function lmb_player_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
||||||
{
|
{
|
||||||
global $lmb_cookie_tab;
|
global $lmb_cookie_tab;
|
||||||
global $lmb_url_pre;
|
global $lmb_url_pre;
|
||||||
@@ -3241,45 +3244,11 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
|
|||||||
$track_file_base = "{$track_id}-{$track_name}-{$track_mix}";
|
$track_file_base = "{$track_id}-{$track_name}-{$track_mix}";
|
||||||
}
|
}
|
||||||
|
|
||||||
$track_file_ogg = "{$track_path}/ogg-256/{$track_file_base}.ogg";
|
$track_file_ogg = "{$track_path}/ogg-256/{$track_file_base}.ogg";
|
||||||
$track_file_mp3 = "{$track_path}/mp3-192/{$track_file_base}.mp3";
|
$track_file_mp3 = "{$track_path}/mp3-192/{$track_file_base}.mp3";
|
||||||
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
|
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
|
||||||
|
|
||||||
$solution_cookie = "jpsolution";
|
echo "
|
||||||
$prefix_url = "{$lmb_url_post}?cookie_id={$solution_cookie}&cookie_value=";
|
|
||||||
$query_string = preg_replace( "/cookie_id={$solution_cookie}&cookie_value=[^&]*&/", "", "{$_SERVER['QUERY_STRING']}");
|
|
||||||
$solution_html_url = htmlentities( "{$prefix_url}html, flash&{$query_string}");
|
|
||||||
$solution_flash_url = htmlentities( "{$prefix_url}flash, html&{$query_string}");
|
|
||||||
$solution_native_url = htmlentities( "{$prefix_url}native&{$query_string}");
|
|
||||||
|
|
||||||
$solution_value = $lmb_cookie_tab[$solution_cookie];
|
|
||||||
|
|
||||||
if( "{$solution_value}" == "html, flash")
|
|
||||||
{
|
|
||||||
$html_class = "link-item-disabled";
|
|
||||||
$flash_class = "link-item";
|
|
||||||
$native_class = "link-item";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( "{$solution_value}" == "flash, html")
|
|
||||||
{
|
|
||||||
$html_class = "link-item";
|
|
||||||
$flash_class = "link-item-disabled";
|
|
||||||
$native_class = "link-item";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$html_class = "link-item";
|
|
||||||
$flash_class = "link-item";
|
|
||||||
$native_class = "link-item-disabled";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( "{$solution_value}" == "native")
|
|
||||||
{
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style=\"background-color:#222222; height: 75px;\">
|
<tr style=\"background-color:#222222; height: 75px;\">
|
||||||
@@ -3292,126 +3261,13 @@ Your browser does not support the audio element.
|
|||||||
</audio>
|
</audio>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style=\"background-color:#222222; height: 25px;\">
|
|
||||||
<td style=\"horizontal-align: left; vertical-align: middle;\">
|
|
||||||
<div style=\"font-size: 12px;\"><a rel=\"nofollow\" class=\"{$html_class}\" href=\"{$solution_html_url}\">JPlayer HTML</a> <a rel=\"nofollow\" class=\"{$flash_class}\" href=\"{$solution_flash_url}\">JPlayer Flash</a> <a rel=\"nofollow\" class=\"{$native_class}\" href=\"{$solution_native_url}\">Native</a></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
";
|
";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style=\"background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-left:1px solid #554461;\"> </td>
|
|
||||||
<td style=\"width: 1%;\">
|
|
||||||
|
|
||||||
<script type=\"text/javascript\" src=\"/jplayer/lib/jquery.min.js\"></script>
|
|
||||||
<script type=\"text/javascript\" src=\"/jplayer/jquery.jplayer.min.js\"></script>
|
|
||||||
<script type=\"text/javascript\" src=\"/jplayer/jquery.jplayer.inspector.js\"></script>
|
|
||||||
";
|
|
||||||
|
|
||||||
|
|
||||||
echo "
|
|
||||||
|
|
||||||
<script type=\"text/javascript\">
|
|
||||||
//<![CDATA[
|
|
||||||
$(document).ready(function(){
|
|
||||||
$(\"#jquery_jplayer_1\").jPlayer({
|
|
||||||
ready: function (event) {
|
|
||||||
$(this).jPlayer(\"setMedia\", {
|
|
||||||
title: \"{$track_fulltitle}\",
|
|
||||||
oga:\"{$track_file_ogg}\",
|
|
||||||
mp3:\"{$track_file_mp3}\"
|
|
||||||
}).jPlayer(\"play\");
|
|
||||||
},
|
|
||||||
swfPath: \"/jplayer\",
|
|
||||||
supplied: \"oga, mp3\",
|
|
||||||
wmode: \"window\",
|
|
||||||
useStateClassSkin: true,
|
|
||||||
autoBlur: true,
|
|
||||||
smoothPlayBar: false,
|
|
||||||
keyEnabled: true,
|
|
||||||
remainingDuration: true,
|
|
||||||
toggleDuration: true,
|
|
||||||
backgroundColor: \"#012345\"
|
|
||||||
});
|
|
||||||
|
|
||||||
$(\"#jplayer_inspector\").jPlayerInspector({jPlayer:$(\"#jquery_jplayer_1\")});
|
|
||||||
});
|
|
||||||
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
";
|
|
||||||
|
|
||||||
echo "
|
|
||||||
|
|
||||||
<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>
|
|
||||||
<div id=\"jp_container_1\" class=\"jp-audio\" role=\"application\" aria-label=\"media player\">
|
|
||||||
<div class=\"jp-type-single\">
|
|
||||||
<div class=\"jp-gui jp-interface\">
|
|
||||||
<div class=\"jp-volume-controls\">
|
|
||||||
<button class=\"jp-mute\" role=\"button\" tabindex=\"0\">mute</button>
|
|
||||||
<button class=\"jp-volume-max\" role=\"button\" tabindex=\"0\">max volume</button>
|
|
||||||
<div class=\"jp-volume-bar\">
|
|
||||||
<div class=\"jp-volume-bar-value\"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=\"jp-controls-holder\">
|
|
||||||
<div class=\"jp-controls\">
|
|
||||||
<button class=\"jp-play\" role=\"button\" tabindex=\"0\">play</button>
|
|
||||||
<button class=\"jp-stop\" role=\"button\" tabindex=\"0\">stop</button>
|
|
||||||
</div>
|
|
||||||
<div class=\"jp-progress\">
|
|
||||||
<div class=\"jp-seek-bar\">
|
|
||||||
<div class=\"jp-play-bar\"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=\"jp-current-time\" role=\"timer\" aria-label=\"time\"> </div>
|
|
||||||
<div class=\"jp-duration\" role=\"timer\" aria-label=\"duration\"> </div>
|
|
||||||
<div class=\"jp-toggles\">
|
|
||||||
<button class=\"jp-repeat\" role=\"button\" tabindex=\"0\">repeat</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=\"jp-details\">
|
|
||||||
<div class=\"jp-title\" aria-label=\"title\"> </div>
|
|
||||||
</div>
|
|
||||||
<div class=\"jp-no-solution\">
|
|
||||||
<span>Update Required</span>
|
|
||||||
To play the media you will need to either update your browser to a recent version or update your <div class=\"link-item\"><a href=\"http://get.adobe.com/flashplayer/\" target=\"_blank\">Flash plugin</a></div>.
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
</div>
|
|
||||||
<div style=\"font-size: 12px;\"><a rel=\"nofollow\" class=\"{$html_class}\" href=\"{$solution_html_url}\">JPlayer HTML</a> <a rel=\"nofollow\" class=\"{$flash_class}\" href=\"{$solution_flash_url}\">JPlayer Flash</a> <a rel=\"nofollow\" class=\"{$native_class}\" href=\"{$solution_native_url}\">Native</a></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
";
|
|
||||||
echo " </td>
|
|
||||||
<td style=\"background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-right:1px solid #180a1f;\"> </td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
";
|
|
||||||
|
|
||||||
if( $lmb_jpi_enable == true)
|
|
||||||
{
|
|
||||||
echo "<div id=\"jplayer_inspector\"></div>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Track Introduction */
|
/* Track Introduction */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -3475,7 +3331,7 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
|
|||||||
<td>
|
<td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
lmb_player_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
||||||
|
|
||||||
echo " </td>
|
echo " </td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -3863,6 +3719,8 @@ function lmb_track_page( $play_type, $play_id, $play_priority, $track_id)
|
|||||||
$track_title = lmb_title_get( $play_type, $play_id, $play_priority, $track_id);
|
$track_title = lmb_title_get( $play_type, $play_id, $play_priority, $track_id);
|
||||||
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
|
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
|
||||||
|
|
||||||
|
lmb_cache_test( $play_path);
|
||||||
|
|
||||||
lmb_header( 4, "Langueur Monotone - {$track_fulltitle} - Track Page", "{$track_fulltitle} - Track", "Langueur Monotone track page, giving all the information about {$track_fulltitle} track", "track, {$track_title}, {$track_fulltitle}", 962, "{$skin_path}");
|
lmb_header( 4, "Langueur Monotone - {$track_fulltitle} - Track Page", "{$track_fulltitle} - Track", "Langueur Monotone track page, giving all the information about {$track_fulltitle} track", "track, {$track_title}, {$track_fulltitle}", 962, "{$skin_path}");
|
||||||
lmb_track_body( $play_type, $play_id, $play_priority, $track_id, $skin_path);
|
lmb_track_body( $play_type, $play_id, $play_priority, $track_id, $skin_path);
|
||||||
lmb_footer( $skin_path);
|
lmb_footer( $skin_path);
|
||||||
@@ -3875,6 +3733,26 @@ function lmb_track_page( $play_type, $play_id, $play_priority, $track_id)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* Cache Test */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_cache_test( $directory)
|
||||||
|
{
|
||||||
|
$cache_dir = "{$directory}/cache";
|
||||||
|
|
||||||
|
// Check if any content file is newer than the cache directory
|
||||||
|
$count = (int)exec( "find {$directory} -newer {$cache_dir} -not -path '{$cache_dir}/*' | grep -c .");
|
||||||
|
|
||||||
|
if( $count > 0)
|
||||||
|
{
|
||||||
|
// Purge all caches, they are all potentially stale
|
||||||
|
array_map('unlink', glob("{$cache_dir}/*"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Download ZIP */
|
/* Download ZIP */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -3883,21 +3761,36 @@ function lmb_download_zip( $directory, $file_list, $mode)
|
|||||||
{
|
{
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case "SIZE":
|
case "SIZE":
|
||||||
{
|
{
|
||||||
return( exec( "cd {$directory}; du -cb ${file_list} | tail -1 | cut -f 1"));
|
$cache_dir = "{$directory}/cache";
|
||||||
}
|
$cache_file = "{$cache_dir}/size-" . md5($file_list);
|
||||||
|
|
||||||
case "RSIZE":
|
// Ensure cache directory exists
|
||||||
{
|
if( !is_dir( $cache_dir))
|
||||||
return( exec( "cd {$directory}; zip -0 -j -p - ${file_list} | wc -c"));
|
{
|
||||||
}
|
mkdir( $cache_dir, 0755);
|
||||||
|
}
|
||||||
|
|
||||||
case "DUMP":
|
if( file_exists( $cache_file))
|
||||||
{
|
{
|
||||||
passthru( "cd {$directory}; zip -0 -j -p - ${file_list}");
|
$size = file_get_contents( $cache_file);
|
||||||
break;
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
// Recompute and store — this updates cache dir mtime for next check
|
||||||
|
$size = exec( "cd {$directory}; zip -0 -j -p - {$file_list} 2>/dev/null | wc -c");
|
||||||
|
file_put_contents( $cache_file, $size);
|
||||||
|
}
|
||||||
|
|
||||||
|
return( (int)$size);
|
||||||
|
}
|
||||||
|
|
||||||
|
case "DUMP":
|
||||||
|
{
|
||||||
|
passthru( "cd {$directory}; zip -0 -j -p - {$file_list} 2>/dev/null");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3915,13 +3808,15 @@ function lmb_download_file( $play_dir, $file_list, $mode, $download_name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "RSIZE");
|
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "SIZE");
|
||||||
|
|
||||||
header( "Content-Description: Langueur Monotone - {$download_name}");
|
header( "Content-Description: Langueur Monotone - {$download_name}");
|
||||||
header( 'Content-Type: application/zip');
|
header( 'Content-Type: application/zip');
|
||||||
header( 'Content-Disposition: attachment; filename="'."langueur_monotone-{$download_name}.zip".'"');
|
header( 'Content-Disposition: attachment; filename="'."langueur_monotone-{$download_name}.zip".'"');
|
||||||
header( 'Content-Length: ' . $zip_size);
|
header( 'Content-Length: ' . $zip_size);
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "DUMP");
|
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "DUMP");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3939,7 +3834,7 @@ function lmb_download_tracks( $play_type, $play_id, $play_priority, $file_type,
|
|||||||
|
|
||||||
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
||||||
{
|
{
|
||||||
$file_list = "tracks/{$file_type}/* covers/{$play_id}-*-800.png";
|
$file_list = "tracks/{$file_type}/* covers/{$play_id}-*-800.png";
|
||||||
|
|
||||||
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$file_type}"));
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$file_type}"));
|
||||||
}
|
}
|
||||||
|
|||||||
1
src/html/welcome.txt
Normal file
1
src/html/welcome.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is the Welcome text!
|
||||||
Reference in New Issue
Block a user