Commit Graph

4254 Commits

Author SHA1 Message Date
Jesús
916b109039 [audio.html]: force download 2022-03-01 04:57:27 +08:00
Jesús
d8d2139321 Show spectrogram if javascript is enabled 2022-03-01 01:17:56 +08:00
Jesús
51b14efa48 Add Search plugin: indexedsearch 2022-02-28 10:20:36 +08:00
Jesús
1079d1cee4 Add plyr as player default and remove NodeJS, npm and videojs 2022-02-28 07:51:38 +08:00
Elisei Roca
fe01dd00fb Replace py-bcrypt with bcrypt.
Almost a drop-in replacement, only needed some str - byte conversions.

The former has not seen a release since 2013, the latter is active with
a last release on Aug. 16th 2020.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-10-11 21:57:40 +11:00
Ben Sturmfels
78d8efed7f Fix some unused imports and local variables. 2021-09-23 21:38:42 +10:00
Ben Sturmfels
6f48143f4c Apply pyupgrade --py36-plus.
This removes some 'u' prefixes and converts simple format() calls to f-strings.
2021-09-23 11:51:04 +10:00
Michael McMahon
bc2990c279 Set videos to preload="metadata" to prevent upfront download [trac#5625].
Setting was previously preload="auto". While preload="auto" *does not* cause a
full upfront download on Firefox, Abrowser, IceCat or Chromium, a user reported
on the LibrePlanet mailing list that it was causing a full download on their
browser. The specifications leave it up to the browser do decide whether to
download, but it makes sense to do what we can to avoid surprising people on low
bandwidth/quota internet connections.

https://html.spec.whatwg.org/multipage/media.html#attr-media-preload

Further, media.libreplanet.org (one of MediaGoblin's biggest users) has
implement this change locally, so it makes sense for us to stay in sync.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-09-20 14:23:06 +10:00
Elisei Roca
5ff0fe2f20 Remove unneeded shebang from test_processing.py.
Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-09-20 12:10:08 +10:00
Olivier Mehani
6a90476e08 Extend left/right arrow key navigation to paginated views [#5627].
Includes "home", "collection", "view all user's media" and "user's profile" views.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-09-19 21:41:48 +10:00
Ben Sturmfels
e7d6996dd1 Update for 0.13.0 development cycle. 2021-09-19 21:22:57 +10:00
Ben Sturmfels
f620b65e05 Set static path relative to codebase.
This help a Guix package to locate the basic static assets.
2021-09-17 22:57:53 +10:00
Ben Sturmfels
af09b76392 Implement gmg serve and gmg celery.
There was an existing stub for `gmg serve`, but had never been completed.

This will make it simpler to run the MediaGoblin web interface and media
processing backend.
2021-09-17 21:42:44 +10:00
Ben Sturmfels
54c610b5fe Revert "Disable registrations by default due to spam."
Turns out this breaks tests. Will attempt again when I have time to deal with
the tests.

This reverts commit 120f144f0e.
2021-09-12 22:51:51 +10:00
Ben Sturmfels
120f144f0e Disable registrations by default due to spam. 2021-09-04 22:48:23 +10:00
Ben Sturmfels
b3d3d33c96 Don't disable existing loggers when initialising Celery.
Prior to this change, the Celery logging did not include any of the logging
calls within MediaGoblin because `disable_existing_loggers` defaulted to True.
This was unhelpful and inconsistent with the logging behaviour of the web process.

The MediaGoblin web process sets logging output based on the configuration in
paste.ini. This is loaded by the `paster` program, rather than MediaGoblin
itself.

The MediaGoblin celery process manually loads its logging config from paste.ini,
but previously defaulted to `disable_existing_loggers=True`, meaning that none
of the application logging flowed through unless the logger was explicitly added
to paste.ini.
2021-08-23 13:46:05 +10:00
Ben Sturmfels
cfe50e6400 Fix images being marked as failed after Celery restart [#5608].
Following the video transcoding work included in v0.10.0, uploading an image and
restarting Celery resulted in the image being marked as failed, even after it
had been initially successfully processed.

The issue was that the initial processing task was not being acknowledged by the task queue following the introduction of the
`CELERY_ACKS_LATE` setting. It's not clear why this is the case, but reverting
the setting fixes this issue and doesn't negatively impact video processing.
2021-08-23 12:46:40 +10:00
Marco Pessotto
c6ec71b6de Remove reference to jsonschema.compat now removed upstream.
Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-08-20 09:59:03 +10:00
Ben Sturmfels
ea5669f93e Convert notifications.js to vanilla JavaScript (no jQuery). 2021-08-19 18:52:10 +10:00
Ben Sturmfels
6c408fb4ea Convert header_dropdown.js to vanilla JavaScript (no jQuery). 2021-08-19 18:44:03 +10:00
Ben Sturmfels
05e4795683 Remove additional mentions of persona in templates and docs. 2021-04-23 18:11:31 +10:00
jgart
ec74b6d032 Remove Mozilla Persona plugin [#5512].
Mozilla persona is RIP since 2016.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-04-23 17:48:03 +10:00
Ben Sturmfels
63ab28795a Remove redundant link to flask-wtf. 2021-04-23 16:41:40 +10:00
Ben Sturmfels
09890d2229 Remove redundant symlink to tinymce. 2021-04-23 16:37:23 +10:00
Rodrigo Martins
9bcebe68c7 Remove the slightly un-intuitive "Resolve" button on the report handling page.
This button just uses JavaScript to reveal the subsequent actions. Better to
show these upfront.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-04-10 15:24:11 +10:00
Ben Sturmfels
cf2261022c Now in the 0.12.0 development cycle. 2021-04-05 22:13:01 +10:00
Ben Sturmfels
d384417aab Fix tests on Debian 11. 2021-04-04 23:23:33 +10:00
Ben Sturmfels
2d941d21e1 Convert atom feeds to use feedgenerator library.
Issue is that Werkzeug > 1.0.0 has removed werkzeug.contrib.atom.AtomFeed,
making it difficult to use a distribution-packaged version of werkzeug. To solve
this, I've replaced use of werkzeug.contrib.atom.AtomFeed with
feedgenerator.Atom1Feed.

After the change, the only major difference between the feeds before and after is
that they use <summary> instead of <content>. Minor differences include no longer
adding 'type="text/html"' on some <link> elements and no "xml:base" attribute on
<entry> elements. I don't think these differences will have any noticable
effect.

Tested on Liferea feed reader.
2021-03-16 12:17:57 +11:00
Ben Sturmfels
83a744b1a2 Update version number, relnotes and upgrading docs in preparation for release. 2021-03-10 20:44:54 +11:00
Ben Sturmfels
9bd3ddb68a Note that download link sorting will be wrong for higher resolutions. 2021-03-09 22:47:53 +11:00
Ben Sturmfels
a25a6e3395 Update video links to support multiple resolution transcoding [#5620].
We may need to push download link creation into the view in the future to make
it more fully featured, but this will solve the immediate issue with missing
download links on new media after 0.10.0. Sorting of entries won't be right if
your media is over 999p since it's alphabetical.
2021-03-09 22:39:04 +11:00
Ben Sturmfels
3ba11716c1 Run LDAP, OpenID and PDF tests under Docker. 2021-03-09 16:56:28 +11:00
Ben Sturmfels
370d8a7296 More robust test fix. 2021-03-06 11:43:22 +11:00
Ben Sturmfels
f7a4dd1168 Fix broken metadata editing test. 2021-03-06 11:24:36 +11:00
Ben Sturmfels
f0d57e3bd8 Remove remaining Python 2 compatibility code. 2021-03-05 23:52:13 +11:00
Ben Sturmfels
9bf3bc1944 Remove remaining imports/calls to six not automatically removed by pyupgrade. 2021-03-05 23:42:38 +11:00
Ben Sturmfels
dec47c7102 Apply pyupgrade --py3-plus to remove Python 2 compatibility code. 2021-03-05 23:12:19 +11:00
Fernando Gutierrez
c2e93da0ce Reinstate audio spectrograms on Python 3 [#5610].
The `audiotospectrogram` module is a complete rewrite of the existing spectrogram
code with support for Python 3. This allows us to drop the bundled `freesound`
library and Python 2-only `audioprocessing` and `spectrogram` modules.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2021-03-03 22:21:11 +11:00
Ben Sturmfels
83429a8658 Drop Python 2 installation support. 2021-03-03 21:40:10 +11:00
Fernando Gutierrez
243354b65e Avoid Celery/RabbitMQ "connection reset" errors [#5609].
This change starts Celery only after RabbitMQ is available. It also returns the
unnecessarily low BROKER_HEARTBEAT setting to default of 120.0 to help prevent
connections being reset on machines under load.
2020-05-12 12:30:35 +10:00
Ben Sturmfels
3d0c2a773b Fix consistency in license list. 2020-05-11 23:47:33 +10:00
Ben Sturmfels
0e9e57ea30 Fix error generating Atom feed upon blank title [#1018]. 2020-05-11 23:38:59 +10:00
Ben Sturmfels
e94f94e639 fixup! Now in 0.11.0 development cycle. 2020-05-06 12:33:59 +10:00
Olivier Mehani
8bb15a5477 Make ldap plugin python3 compatible
Signed-off-by: Olivier Mehani <shtrom+mediagoblin@ssji.net>
2020-05-06 12:03:28 +10:00
Ben Sturmfels
74262351b7 Update version for release. 2020-05-04 13:11:48 +10:00
Ben Sturmfels
a9b7bd60b2 subtitles: Add documentation, limit uploads to *.vtt files, only show for video [#5589]. 2020-04-30 12:05:47 +10:00
Ben Sturmfels
e99f0aeac6 Add deprecation warning when running Python 2 [#5598]. 2020-04-29 14:10:01 +10:00
Ben Sturmfels
16fbe85247 Fix dependencies and tests for clean Python 2 & 3 test runs under Docker.
This change gives a clean test run in the Debian-based Python 2 and Python 3
docker images.
2020-04-28 18:23:24 +10:00
Ben Sturmfels
e3931333da Revert "Use audio icon when spectrogram fails. Add note to doc:media-types."
This reverts commit 2b487fc16d.
2020-04-28 18:23:24 +10:00
Ben Sturmfels
632e973608 Revert "Fix Jorge's audio upload workaround in Python 3."
This reverts commit f1c288b1d8.
2020-04-28 18:23:24 +10:00