Disallow uploading videos with 10-bit color or 4:4:4 chroma subsampling. Neither of these features are supported by Firefox. Only 8 such videos have been uploaded to Danbooru: * https://danbooru.donmai.us/media_assets/3070695 (4:4:4) * https://danbooru.donmai.us/media_assets/3070697 (4:4:4) * https://danbooru.donmai.us/media_assets/3292518 (4:4:4) * https://danbooru.donmai.us/media_assets/3358659 (10-bit) * https://danbooru.donmai.us/media_assets/3358660 (10-bit) * https://danbooru.donmai.us/media_assets/3730866 (10-bit) * https://danbooru.donmai.us/media_assets/5056665 (10-bit) * https://danbooru.donmai.us/media_assets/5479605 (4:4:4) Note that Exiftool doesn't output this information, so it's not in the EXIF metadata. We have to reply on ffprobe at upload time instead. Followup to #3615.
Logical
This directory contains library code used through Danbooru. This includes things like defining API clients, dealing with sources, parsing tag searches, storing and resizing images, and so on.
Many of the files here use the Service Object pattern. Instead of putting complex code in models or controllers, it goes here, in plain old Ruby objects (POROs). This keeps models and controllers simpler, and keeps domain logic isolated and independent from the database and the HTTP request cycle.