User Controls
Video Embeds - Case Sensitive
-
2022-10-21 at 10:10 AM UTCyou can use video tags to embed standard videos with lowercase extensions, but if they're either uppercase or partially uppercase the embed fails
ie.
[video]https://pomf2.lain.la/f/4qxmuz0c.MP4[/video]
does not work even though the file is valid. normally I'd just rename and reupload, but hosts often detect the video hash and just give me a link to the original uppercase file instead of re-generating a new one:
-
2022-10-21 at 10:20 AM UTCI've been wondering about this extensively.
-
2022-10-21 at 10:21 AM UTCI'm hoping it's something lanny can fix with a one-line change
I could download the code and HAVE A PULL but I don't want to -
2022-10-21 at 2:15 PM UTCso thats why.
edit: just manually change the ext to small case -
2022-10-24 at 7:15 PM UTC
-
2022-10-24 at 7:18 PM UTC
-
2022-10-24 at 7:53 PM UTCI'm thinking line 121 is looking for a lower-case extension and then deciding it's not a video.
Maybe Sophie could fix this. Sophie?
iss_bbcode.py
113 ext = url.path.split('.')[-1]
114
115 if url.netloc in ('www.youtube.com', 'youtube.com', 'm.youtube.com'):
116 return _embed_youtube(url)
117 elif url.netloc in ('youtu.be',):
118 return _embed_youtube_shortcode(url)
119 elif url.netloc in ('bitchute.com', 'www.bitchute.com'):
120 return _embed_bitchute(url)
121 elif ext in ('webm', 'mp4'):
122 return _embed_html5_video(url)
123 else:
124 raise EmbeddingNotSupportedException('Unrecognized service.')
125