about summary refs log tree commit diff
path: root/app/models/media_attachment.rb
AgeCommit message (Collapse)Author
2020-09-08Monsterfork v2 Kaiju Commit 2020.06.27.1 - 2020.09.05.5Fire Demon
2020-08-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/accounts_controller.rb`: Upstream change too close to a glitch-soc change related to instance-local toots. Merged upstream changes. - `app/services/fan_out_on_write_service.rb`: Minor conflict due to glitch-soc's handling of Direct Messages, merged upstream changes. - `yarn.lock`: Not really a conflict, caused by glitch-soc-only dependencies being textually too close to updated upstream dependencies. Merged upstream changes.
2020-08-30Fix videos with near-60 fps being rejected (#14684)Eugen Rochko
Fix #14668
2020-07-22Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/javascript/mastodon/actions/compose.js`: Not a “real” conflict, but change too close to a change we made to fix the vanilla WebUI locally pushing authored local-only toots in the public TL view.
2020-07-19Fix movie width and frame_rate returning nil (#14357)Takeshi Umeda
* Fix movie width and frame_rate returning nil * Add StreamValidationError and raise * Fix code style
2020-07-15Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `config/routes.rb`: Upstream disabled E2EE routes, which we did earlier, but slightly differently. Took upstream's version.
2020-07-14Fix larger video files not being transcoded (#14306)ThibG
Since #14145, the `set_type_and_extension` has been moved from `before_post_process` to `before_file_post_process`, but while the former runs before all validations performed by Paperclip, the latter is dependent on the order validations and hooks are defined. In our case, this meant video files could be checked against the generic 10MB limit, causing validation failures, which, internally, make Paperclip skip post-processing, and thus, transcoding of the video file. The actual validation would then happen after the type is correctly set, so the large file would pass validation, but without being transcoded first. This commit moves the hook definition so that it is run before checking for the file size.
2020-07-05Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `.env.production.sample`: Upstream changed it completely. Changed ours to merge upstream's new structure, but keeping most of the information.
2020-07-05Add color extraction for audio thumbnails (#14209)Eugen Rochko
2020-06-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `.env.production.sample`: Upstream deleted it, I decided to keep it. - `package.json`: Upstream updated a dependency textually too close to wavesurfer.js which has been deleted from upstream but is kept in glitch-soc for now.
2020-06-29Add customizable thumbnails for audio and video attachments (#14145)Eugen Rochko
- Change audio files to not be stripped of metadata - Automatically extract cover art from audio if it exists - Add `thumbnail` parameter to `POST /api/v1/media`, `POST /api/v2/media` and `PUT /api/v1/media/:id` - Add `icon` to represent it in attachments in ActivityPub - Fix `preview_url` containing URL of missing missing image when there is no thumbnail instead of null - Fix duration of audio not being displayed on public pages until the file is loaded
2020-06-26Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-06-25Fix various issues around OpenGraph representation of media (#14133)Eugen Rochko
- Fix audio attachments not being represented in OpenGraph tags - Fix audio being represented as "1 image" in OpenGraph descriptions - Fix video metadata being overwritten by paperclip-av-transcoder - Fix embedded player not using Mastodon's UI - Fix audio/video progress bars not moving smoothly - Fix audio/video buffered bars not displaying correctly
2020-05-03Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/statuses_controller.rb`: Upstream disabled the embed controller for reblogs. Not a real conflict, but glitch-soc has an extra line to deal with its theming system. Ported upstream changes. - `app/javascript/packs/public.js`: Upstream made changes to get rid of most inline CSS, this changes javascript for public pages, which in glitch are split between different files. Ported those changes. - `app/models/status.rb`: Upstream changed the block check in `Status#permitted_for` to include domain-block checks. Not a real conflict with glitch-soc, but our scope is slightly different, as our scope for unauthenticated access do not include instance-local toots. Ported upstream changes. - `app/serializers/rest/instance_serializer.rb`: Not a real conflict, upstream added a new field to the instance serializer, the conflict is one line above since we added more of that. Ported upstream changes. - `app/views/settings/profiles/show.html.haml`: Upstream got rid of most inline CSS and moved hidden elements to data attributes in the process, in fields were we have different values. Ported upstream changes while keeping our glitch-specific values. - `app/views/statuses/_simple_status.html.haml`: Upstream got rid of inline CSS on an HAML line we treat differently, stripping empty text nodes. Ported upstream changes to the style attribute, keeping the empty text node stripping behavior.
2020-04-26Add separate cache directory for non-local uploads (#12821)Eugen Rochko
2020-03-27Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/services/post_status_service.rb`: CW/sensitive logic fixed upstream, but different in glitch-soc. Ported the changes accordingly.
2020-03-26Change `tootctl media remove-orphans` to work for all classes (#13316)Eugen Rochko
Change `tootctl media lookup` to not use an interactive prompt
2020-03-22Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `README.md`: Our README.md files are completely different. Discarded upstream changes. - `app/javascript/core/admin.js`: Updating rails-ujs, no real conflict, but a comment to close to changed code. Various glitch-soc-only files have been updated to match those changes, though. - `package.json`: No real conflict, just an additional dependency in glitch-soc that was too close to something updated upstream. Took upstream's changes.
2020-03-10Fix videos with unsupported colorspace not being transcoded (#13242)ThibG
2020-03-09Fix MP4 (H264 + AAC) video files being needlessly re-encoded (#13239)ThibG
2020-03-09Change video uploads to always be converted to H264/MP4 (#13220)Eugen Rochko
Even if the container format is the same (.mp4), the codec could be different and not playable in web browsers
2020-03-09Change video uploads to enforce certain limits (#13218)Eugen Rochko
- Dimensions at most 1920x1200 - Frame rate at most 60
2020-03-08Change local media attachments to perform heavy processing asynchronously ↵Eugen Rochko
(#13210) Fix #9106
2020-03-08Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/api/v1/statuses_controller.rb`: Conflict due to upstream adding a new parameter (with_rate_limit), too close to glitch-soc's own additional parameter (content_type). Added upstream's parameter. - `app/services/post_status_service.rb`: Conflict due to upstream adding a new parameter (rate_limit), too close to glitch-soc's own additional parameter (content_type). Added upstream's parameter. - `app/views/settings/preferences/appearance/show.html.haml`: Conflict due to us not exposing theme settings here (as we have a different flavour/skin menu). Took upstream change, while still not exposing theme settings. - `config/webpack/shared.js`: Coding style fixes for a part we have rewritten. Discarded upstream changes.
2020-03-05Fix "tootctl media remove-orphans" crashing when encountering invalid media ↵Eugen Rochko
(#13170) Fixes #13168
2020-01-24Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/statuses_controller.rb`: Minor conflict due to theming system
2020-01-23Fix media attachments without file being uploadable (#12562)Eugen Rochko
Fix #12554
2020-01-04Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/application_controller.rb`: Conflict due to theming system. - `app/controllers/oauth/authorizations_controller.rb`: Conflict due to theming system.
2020-01-04Fix base64-encoded file uploads not being possible (#12748)Eugen Rochko
Fix #3804, Fix #5776
2019-12-12Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/application_controller.rb Minor conflict due to glitch-soc's theming system
2019-12-08Add `tootctl media remove-orphans` (#12568)Eugen Rochko
2019-12-07Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - package.json Not really a conflict, caused by an additional dependency in glitch-soc. - yarn.lock Not really a conflict, caused by an additional dependency in glitch-soc.
2019-12-02Update ESLint and RuboCop in Code Climate (#12534)Yamagishi Kazutoshi
2019-11-06Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `package.json`
2019-11-04Fix remote media descriptions being cut off at 420 chars (#12262)ThibG
* Fix remote media descriptions being cut off at 420 chars Fixes #12258 * Fix tests
2019-10-27Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - README.md - app/helpers/statuses_helper.rb Upstream moved account helpers to their own file, we had extra helpers there, moved too. - app/lib/sanitize_config.rb - app/models/user.rb - app/serializers/initial_state_serializer.rb - config/locales/simple_form.en.yml - spec/lib/sanitize_config_spec.rb
2019-10-24remove audio metadata (#12171)Hugo Gameiro
2019-10-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - README.md - app/javascript/styles/mastodon/components.scss conflicts caused by image URLs being different - app/models/status.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline - app/views/statuses/_simple_status.html.haml - config/locales/en.yml some strings were changed upstream - spec/models/status_spec.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline
2019-10-06add loglevel fatal to video and audio styles (#12088)Hugo Gameiro
2019-10-03Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/models/media_attachment.rb Upstream raised max image size from 8MB to 10MB while our limit is configurable. Raised the default to 10MB.
2019-10-03Fix performance of GIF re-encoding (#12057)Eugen Rochko
* Change animated GIF detection to not shell out to ImageMagick Signed-off-by: Eugen Rochko <eugen@zeonfederated.com> * Change video encoding parameters to limit to 10800 video frames Signed-off-by: Eugen Rochko <eugen@zeonfederated.com> * Limit GIF image size further Signed-off-by: Eugen Rochko <eugen@zeonfederated.com> * Always strip metadata from video files * Fix code style issues
2019-09-13Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - Gemfile - app/controllers/api/v1/search_controller.rb Conflict because we changed the number of default results to be configurable - app/lib/settings/scoped_settings.rb Addition of a new “noindex” site-wide setting, conflict due to our change of the two other site-wide settings (default flavour and skin instead of theme) - spec/controllers/application_controller_spec.rb Addition of a new “noindex” site-wide setting, conflict due to our change of the two other site-wide settings (default flavour and skin instead of theme)
2019-09-13Change max length of media descriptions from 420 to 1500 characters (#11819)Eugen Rochko
Fix #11658
2019-09-10Add retry for failed media downloads and `tootctl media refresh` (#11775)Eugen Rochko
2019-09-10Change tootctl to use inline parallelization instead of Sidekiq (#11776)Eugen Rochko
- Remove --background option - Add --concurrency(=5) option - Add progress bars
2019-08-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/views/directories/index.html.haml Upstream has redesigned the profile directory, and we had a glitch-soc-specific change to hide follower counts. Ported that change to the new design.
2019-08-30Add more media formats (#11687)umonaca
* Add more media formats * Removed amr file type
2019-08-19Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/home_controller.rb - app/controllers/shares_controller.rb - app/javascript/packs/public.js - app/models/status.rb - app/serializers/initial_state_serializer.rb - app/views/home/index.html.haml - app/views/layouts/public.html.haml - app/views/public_timelines/show.html.haml - app/views/shares/show.html.haml - app/views/tags/show.html.haml - config/initializers/content_security_policy.rb - config/locales/en.yml - config/webpack/shared.js - package.json
2019-08-17Remove WebP support (#11589)Stanislas
2019-07-28Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka