mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-28 21:12:02 +00:00
fix(rss): set srt transcripts' mimetype to application/x-subrip with rel="captions" attribute
closes #360
This commit is contained in:
parent
6833dd05ab
commit
16a3fdb56e
@ -276,7 +276,7 @@ class Mimes
|
|||||||
],
|
],
|
||||||
'svg' => ['image/svg+xml', 'image/svg', 'application/xml', 'text/xml'],
|
'svg' => ['image/svg+xml', 'image/svg', 'application/xml', 'text/xml'],
|
||||||
'vcf' => 'text/x-vcard',
|
'vcf' => 'text/x-vcard',
|
||||||
'srt' => ['text/srt', 'text/plain', 'application/octet-stream'],
|
'srt' => ['application/x-subrip', 'text/srt', 'text/plain', 'application/octet-stream'],
|
||||||
'vtt' => ['text/vtt', 'text/plain'],
|
'vtt' => ['text/vtt', 'text/plain'],
|
||||||
'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
|
'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
|
||||||
'stl' => ['application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle'],
|
'stl' => ['application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle'],
|
||||||
|
@ -360,6 +360,9 @@ if (! function_exists('get_rss_feed')) {
|
|||||||
pathinfo($episode->transcript->file_url, PATHINFO_EXTENSION)
|
pathinfo($episode->transcript->file_url, PATHINFO_EXTENSION)
|
||||||
) ?? 'text/html',
|
) ?? 'text/html',
|
||||||
);
|
);
|
||||||
|
// Castopod only allows for captions (SubRip files)
|
||||||
|
$transcriptElement->addAttribute('rel', 'captions');
|
||||||
|
// TODO: allow for multiple languages
|
||||||
$transcriptElement->addAttribute('language', $podcast->language_code);
|
$transcriptElement->addAttribute('language', $podcast->language_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user