Minor bug fixes

parent c217ddd7
...@@ -257,7 +257,7 @@ if(!class_exists('SH_Query')) { ...@@ -257,7 +257,7 @@ if(!class_exists('SH_Query')) {
if(!$idtype) return false; if(!$idtype) return false;
$sql = "SELECT * FROM {$wpdb->prefix}".SH_PREFIX."videos WHERE {$idtype}=".intval($id); $sql = "SELECT * FROM {$wpdb->prefix}".SH_PREFIX."videos WHERE {$idtype}=".intval($id)." ORDER BY created DESC";
$dbres = $wpdb->get_results( $sql ); $dbres = $wpdb->get_results( $sql );
if(is_array($dbres) && count($dbres) > 0) if(is_array($dbres) && count($dbres) > 0)
{ {
......
...@@ -44,7 +44,7 @@ class SH_VideoStream ...@@ -44,7 +44,7 @@ class SH_VideoStream
{ {
$this->path = $filePath; $this->path = $filePath;
$this->filename = basename($filePath); $this->filename = basename($filePath);
$this->myme_type = sh_mime_type($filePath); $this->mime_type = sh_mime_type($filePath);
$this->download_type = $download; $this->download_type = $download;
} }
......
...@@ -74,12 +74,12 @@ function sh_genpass_register_form() ...@@ -74,12 +74,12 @@ function sh_genpass_register_form()
function sh_hls_player($video_url, $posters='') function sh_hls_player($video_url, $posters='')
{ {
echo SH_VideoPlayer::addPlayer('hls', $video_url, $posters); SH_VideoPlayer::addPlayer('hls', $video_url, $posters);
} }
function sh_xr_player($video_url, $posters='', $projection='180_LR') function sh_xr_player($video_url, $posters='', $projection='180_LR')
{ {
echo SH_VideoPlayer::addPlayer('xr', $video_url, $posters, $projection); SH_VideoPlayer::addPlayer('xr', $video_url, $posters, $projection);
} }
function sh_fix_user_with_no_plan($userid) function sh_fix_user_with_no_plan($userid)
......
...@@ -357,6 +357,13 @@ function sh_mime_type($filename) { ...@@ -357,6 +357,13 @@ function sh_mime_type($filename) {
'qt' => 'video/quicktime', 'qt' => 'video/quicktime',
'mov' => 'video/quicktime', 'mov' => 'video/quicktime',
'm3u8' => 'application/vnd.apple.mpegurl', 'm3u8' => 'application/vnd.apple.mpegurl',
'm4v' => "video/mp4",
'mp4' => "video/mp4",
'm4a' => "audio/mp4",
'm4s' => "video/iso.segment",
'init' => "video/mp4",
'header' => "video/mp4",
'ts' => "video/MP2T",
// adobe // adobe
'pdf' => 'application/pdf', 'pdf' => 'application/pdf',
......
...@@ -219,21 +219,20 @@ get_header(); ?> ...@@ -219,21 +219,20 @@ get_header(); ?>
else if($gif_preview) echo '<img class="sexhack_videopreview" src="'.$gif_preview.'" loading="lazy"></img>'; else if($gif_preview) echo '<img class="sexhack_videopreview" src="'.$gif_preview.'" loading="lazy"></img>';
else echo '<img class="sexhack_videopreview" src="'.$thumb.'" loading="lazy"></img>'; else echo '<img class="sexhack_videopreview" src="'.$thumb.'" loading="lazy"></img>';
?> ?>
<h2 class='sexhack-videonotify'><b>PUBLIC VIDEO NOT AVAILABLE</b></h2> <h2 class='sexhack-videonotify' style="padding:5%;"><b>PUBLIC VIDEO NOT AVAILABLE</b></h2>
<?php <?php
/*
if($hls_members) { if($hls_members) {
?> ?>
<h3><a href="">members version here!</a></h3> <h3 class='sexhack-videonotify' style="padding:1px;"><a href="/register/">Register for free and watch members version!</a></h3>
<?php <?php
} }
if($hls_premium) { if($hls_premium) {
?> ?>
<h3><a href="">Premium users version here!</a></h3> <h3 class='sexhack-videonotify' style="padding:1px;"><a href="">Register to watch premium version!</a></h3>
<?php <?php
} }
*/
} }
?> ?>
</div> <!-- video container --> </div> <!-- video container -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment