4254 Commits

Author SHA1 Message Date
Ben Sturmfels
4f3f70d15a
Remove spectrograms from Python 2 also [#5594].
For 0.10.0 we're removing specrograms entirely for reliability. This change only
disables spectrograms and updates install docs and Dockerfiles. We still need
to strip out all the spectrogram code and extlib/freesound/.
2020-04-28 18:19:57 +10:00
Ben Sturmfels
4a150fa29e
Preparing to release 0.10. 2020-04-28 13:44:21 +10:00
Ben Sturmfels
a9aae9a059
Unmute videos by default.
Fixes #5590.
2020-04-24 15:24:33 +10:00
Ben Sturmfels
15c45a820f
Decode request.query_string before use.
Prior to this change, when pagination kicks in on the user management or report
management panel, the following exception is raised:

  TypeError: a bytes-like object is required, not 'str'

The cause is that `request.query_string` in the URL parameters in raw bytestring
form as per Werkzeug documentation.
2020-04-09 15:53:49 +10:00
Ben Sturmfels
f9112bd883
Revert "Decode request.query_string before use."
This reverts commit b6fba854007bb4392846085a60178c44dbd7989e.
2020-04-09 15:48:21 +10:00
Ben Sturmfels
b6fba85400
Decode request.query_string before use.
This doesn't seem to be an issue in my Guix SD/Python 3.7 testing, but hit an
issue on Debian 9/Python3.5 where concatenating text to `request.query_string`
was causing the error:

  TypeError: a bytes-like object is required, not 'str'

This clearly hasn't been an issue in the past though, so I suspect there's a
library somewhere that's on a different version and is behaving differently.
2020-04-09 15:29:51 +10:00
Ben Sturmfels
f1c288b1d8
Fix Jorge's audio upload workaround in Python 3.
Unfortunately now the player isn't showing up because there's no thumbnail.
2020-04-07 16:35:09 +10:00
Ben Sturmfels
882cd7ea3e
Note possible future steps for Python 3 audio thumbnailing. 2020-04-02 17:18:39 +11:00
Jorge
2b487fc16d
Use audio icon when spectrogram fails. Add note to doc:media-types.
In addition to side-stepping spectrograms completely in Python 3 in 1038aea8,
this commit adds some fallbacks that will help with potential issues in Python 2.

Fixes Issue #5457

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
Author: Jorge <mediagoblin@gybs.waa>
2020-04-02 16:58:11 +11:00
Muto
5252ef9f17
Add visual feedback on link hover
Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2020-04-02 13:57:16 +11:00
Ben Sturmfels
1038aea822
Fix audio thumbnailing once and for all.
This change adds a Python 3-specific audio thumbnailer that side-steps the
bundled Python 2-only `audioprocessing` module. Instead of an audio spectrogram,
Python 3 users will get a static image.

This also allows me to remove my ineffective customisations to
`audioprocessing`, returning it to the upstream version as should always be the
case for vendored code in "extlib".
2020-04-01 16:52:05 +11:00
Ben Sturmfels
ad3a0aea83
Handle moved SharedDataMiddleware in werkzeug >= 0.15.0. 2020-04-01 15:32:42 +11:00
Ben Sturmfels
c5a6bbdc88
Use items() for Python 3 support. 2019-11-27 22:30:19 +11:00
Ben Sturmfels
7075a065a2
Extend install instructions for raven plugin. 2019-11-27 22:14:52 +11:00
Ben Sturmfels
48208c278c
Prevent warning when importing GstPbutils.
Warning was:

PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
2019-11-01 16:41:45 +11:00
Olivier Mehani
d269b1a839
Add datetime_format config option.
Moves the datetime_format used in various places to the config and allows a
global override per site.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2019-09-20 10:38:09 +10:00
Ben Sturmfels
46ccfabcbe
metadata_display: Refine spacing. 2019-09-18 17:36:36 +10:00
Ben Sturmfels
2ca068851b
metadata_display: Improve default alignment/spacing of metadata. 2019-09-18 17:28:43 +10:00
Ben Sturmfels
b1d50f7beb
Even up top/bottom margins around header dropdown button.
Bottom margin was less than top margin.
2019-09-18 16:02:38 +10:00
Ben Sturmfels
c33168b3d8
Add basic duplicate prevention for batchaddmedia. 2019-09-18 15:58:24 +10:00
Ben Sturmfels
25bc7ea7f6
Update metadata_display plugin for Python 3.
Switching from iteritems() to items() is technically less memory efficient on
Python 2, but this appeared be a significantly cleaner approach than adding six
to the template context. It's also the right choice assuming the project will at
some point go Python 3 only.
2019-09-18 15:30:32 +10:00
Ben Sturmfels
8096beab5c
Add Python 3 docker-compose recipe for MediaGoblin hacking. 2019-09-16 18:08:57 +10:00
Ben Sturmfels
8f18381bbc
batchaddmedia: Simplify the Python 2 & 3 unicode handling.
To avoid issues with quotes, I've replaced the manual CSV handling with
csv.DictReader and simplified the unicode handling down to a single line. I
don't believe any special encoding is required when writing to the database.

This has been tested by importing a CSV with braille characters on Python 3 and
Python 2.
2019-09-12 19:39:54 +10:00
Ben Sturmfels
eb36543364
Remove unicode literals in batchaddmedia. 2019-09-12 15:41:36 +10:00
Ben Sturmfels
88ecf6a340
Fix URL-based importing with batchaddmedia command.
The command was raising "io.UnsupportedOperation: seek" for URL-based imports
and didn't support HTTPS.
2019-09-12 14:47:45 +10:00
Boris Bobrov
a65ffb4b69 Fix saving original of the video
Original of the video was not saved because info about it was not
written to the database. Fixed that.

Also removed original video from get_all_media listing. The method is
weird, we should evaluate whether it is video-specific and how to
generalize it.
2018-07-13 19:05:38 +02:00
Boris Bobrov
92a94f4e77 simplify an if and fix string formatting 2018-07-13 18:29:01 +02:00
Boris Bobrov
8510eca07b nitpicking 2018-07-13 15:00:58 +02:00
Boris Bobrov
044e9a2d79 close tag in subtitles html 2018-07-12 19:06:18 +02:00
Boris Bobrov
4d2aab64cc move subtitles out of media streams in html 2018-07-12 19:04:45 +02:00
Boris Bobrov
23af1d8cbc Merge branch 'transcoding_progress'
This probably broke stuff
2018-07-12 18:49:35 +02:00
Boris Bobrov
4551a808be Fixes for small bugs
There were some blocking issues in the code. They are small, but break
tests and/or production. Fixed some of them.
2018-07-12 18:27:44 +02:00
Boris Bobrov
8e5b7f6339 always guess the same filetype 2018-07-12 12:50:54 +02:00
Boris Bobrov
f8f471e7ee finally fix url validator 2018-07-12 12:50:37 +02:00
Boris Bobrov
99a3e4c880 Revert "Revert "Import messages in blog views""
This reverts commit 8c36ec5246828e3c99d956edd8524f3ade430571.
2018-07-12 07:36:00 +02:00
Boris Bobrov
9861ad12d3 fix typo 2018-07-11 18:26:23 +02:00
Boris Bobrov
87548030cb fix auth error and simplify url and email checks 2018-07-11 17:30:09 +02:00
Boris Bobrov
5430bc2cdd remove requirement for the file to be with single dot in name 2018-07-11 16:54:08 +02:00
Boris Bobrov
4024bcddf9 fix default gmg help message 2018-07-11 16:53:32 +02:00
Boris Bobrov
e08de70757 Merge remote-tracking branch 'gsoc2016/Subtitle-1' 2018-07-10 18:29:30 +02:00
Andrew Browning
588162b861 Fix server crash on blog about page [#5572]
Don't bother checking for user's blog if no user returned.
2018-07-08 19:01:07 -04:00
ĎÚβĨŐÚŚ Dod
3dfc8c9b4b 2 bug fixes in editor views
* `WTForms` instances get `__init__`-ed with `defaults` as `kwargs`.
  The first arg is a `request.form` (which is what one must supply if
  this is a `POST` and must *not* supply otherwise).
  The content of that form (empty on `GET`) has higher priority than
  the defaults (which makes the user get an empty form).

* Fix `edit_profile()` to allow changing `location` from a non-blank
  value to blank (i.e. removing the location).

(cherry picked from commit 75f3e23b92392b9bd309fab4c1a52fd38d453627)
2018-06-28 22:54:06 +02:00
Dpg
bc179396a6 Add Creative Commons 4.0 licenses [#955]
Add CC version 4.0 licenses to SORTED_LICENSES.
2018-05-24 01:04:48 +10:00
Andrew Browning
58dce892e1 Add moderation panel thumbnail header [#5563]
Add moderation panel column header for thumbnail column.
2018-04-08 19:49:46 -04:00
Andrew Browning
a35007cc2d Process videos with incorrect date tags [#5409]
Video processing expects datetime tags in a specific format. This
commit allows videos with missing or incorrect datetime tags to be
processed with no datetime tags instead of failing.
2018-04-08 19:40:02 -04:00
Andrew Browning
9a23a81671 Prevent video plugin from processing svg [#934]
Prior to the gstreamer-1.0 upgrade, the video processing engine included
a check for excluded extensions which gstreamer might accept despite us
not wanting to process them. In commit 91f5f5e, the check against
EXCLUDED_EXT was removed. Since then, the video plugin has accepted and
attempted to process svg files.

This commit adds the check against EXCLUDED_EXTS into the sniff_handler
function so that we can bail out on certain file extensions before the
plugins tries to sniff the file type. The previous implementation
excluded nef files, which appears to be a Nikon camera image. I've
copied that forward to this code. I've also added a log message to
indicate that we're purposefully refusing to process the file.
2018-04-04 17:11:15 -04:00
Andrew Browning
fee80cf134 Remove backup file added in b5dd245 2018-04-04 15:24:08 -04:00
chrysn
98340b6d03 Fix EXIF rotation to make the image portrait on demand
Closes: https://issues.mediagoblin.org/ticket/5525
Signed-off-by: Andrew Browning <ayleph@thisshitistemp.com>
2017-11-29 03:02:41 -05:00
Boris Bobrov
b3429ec69c move alembic.ini to python app dir 2017-11-14 22:01:19 +03:00
Romain Porte
65945005cf Added tests for tags in image API object 2017-11-12 00:08:02 +03:00