check in
This commit is contained in:
parent
07c9390292
commit
b8bbb27871
@ -41,7 +41,7 @@ h5. bts_podcast_filename
|
||||
The filename of the media file. Automatically generated from the title by default.
|
||||
|
||||
Attributes:
|
||||
*ext=*
|
||||
*type=*
|
||||
File extension. Recommended is either _mp3_ or _ogg_. Default is _mp3_.
|
||||
|
||||
*name=*
|
||||
@ -107,16 +107,16 @@ function bts_podcast_path($atts) {
|
||||
|
||||
function bts_podcast_filename($atts) {
|
||||
extract(lAtts(array(
|
||||
'ext' => 'mp3',
|
||||
'type' => 'mp3',
|
||||
'name' => NULL,
|
||||
), $atts));
|
||||
if (! $name) {
|
||||
$raw_name = strtolower(title());
|
||||
$raw_name = strtolower(title($atts));
|
||||
$stripped = trim($raw_name);
|
||||
$replaced = preg_replace('(\s+|[^A-Za-z0-9\.\-]+)','.',$stripped);
|
||||
$name = preg_replace('(\.+)','.',$replaced);
|
||||
}
|
||||
return $name . '.' . $ext;
|
||||
return $name . '.' . $type;
|
||||
}
|
||||
|
||||
|
||||
@ -129,7 +129,7 @@ function bts_podcast_guid ($atts) {
|
||||
|
||||
if (($byte == '1' && $db == '1') || ($string == '')) {
|
||||
//$checksum = safe_query('select checksum from sha256 where url_title = \'' . article_url_title() . '\' and filename = \'' . bts_podcast_filename() . '\'');
|
||||
$checksum = fetch('checksum','sha256','filename',bts_podcast_filename());
|
||||
$checksum = fetch('checksum','sha256','filename',bts_podcast_filename($atts));
|
||||
} elseif ($byte == '1') {
|
||||
$checksum = hash_file('sha256',$string);
|
||||
} else {
|
||||
@ -140,9 +140,11 @@ return $checksum;
|
||||
|
||||
|
||||
function bts_podcast_media_uri ($atts) {
|
||||
extract(lAtts(array(
|
||||
'uri' => site_url() . bts_podcast_path() . bts_podcast_filename(),
|
||||
), $atts));
|
||||
$default_vals = array('type' => 'mp3');
|
||||
//$default_vals['uri'] = site_url($atts) . bts_podcast_path($type=$default_vals['type']) . bts_podcast_filename($type=$default_vals['type']);
|
||||
$default_vals['uri'] = site_url($atts) . bts_podcast_path($atts) . bts_podcast_filename($atts);
|
||||
extract(lAtts(array($default_vals), $atts));
|
||||
//if ($uri == site_url() .
|
||||
return $uri;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user