Commit 16a3fdb5 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(rss): set srt transcripts' mimetype to application/x-subrip with rel="captions" attribute

closes #360
parent 6833dd05
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ class Mimes
        ],
        'svg' => ['image/svg+xml', 'image/svg', 'application/xml', 'text/xml'],
        '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'],
        'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
        'stl' => ['application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle'],
+3 −0
Original line number Diff line number Diff line
@@ -360,6 +360,9 @@ if (! function_exists('get_rss_feed')) {
                        pathinfo($episode->transcript->file_url, PATHINFO_EXTENSION)
                    ) ?? 'text/html',
                );
                // Castopod only allows for captions (SubRip files)
                $transcriptElement->addAttribute('rel', 'captions');
                // TODO: allow for multiple languages
                $transcriptElement->addAttribute('language', $podcast->language_code);
            }