This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
if(!defined('__KIMS__')) exit;
function getVodCode($src)
{
$exp1 = explode('youtube.com/embed/',$src);
$exp2 = strstr($exp1[1],'?') ? explode('?',$exp1[1]) : explode('"',$exp1[1]);
return $exp2[0];
}
function getVodThumb($src,$what)
{
return '//img.youtube.com/vi/'.getVodCode($src).'/'.$what.'.jpg';
}
function getVodUrl($src)
{
return '//www.youtube.com/watch?feature=player_detailpage&v='.getVodCode($src);
}
function getMediaLink($R,$type,$size)
{
if ($R['type'] == 2 || $R['type'] == 5) return $R['url'].$R['folder'].'/'.getPreviewResize($R['tmpname'],$size);
if ($R['type'] == -1) return $R['src'];
if ($R['type'] == 0) return getVodUrl($R['src']);
return '#.';
}
?>