| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Calling the processing task and handling the exceptions is
easy, but has a bunch of caveats, so factor it out into an
easy callable function.
|
|
|
|
|
|
| |
Start to refactor our upload handling in main submit and
the api. Start factoring out the handling of PuSH url
handling.
|
|
|
|
|
| |
On SQL we can't generate the primary key on our own. So
just remove this stuff.
|
|
|
|
|
| |
all callers were forced to use validate=True anyway. So
remove this useless stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were refering to model._id in most of the code base as this is
what Mongo uses. However, each use of _id required a) fixup of queries:
e.g. what we did in our find() and find_one() functions moving all
'_id' to 'id'. It also required using AliasFields to make the ._id
attribute available. This all means lots of superfluous fixing and
transitioning in a SQL world.
It will also not work in the long run. Much newer code already refers
to the objects by model.id (e.g. in the oauth plugin), which will break
with Mongo. So let's be honest, rip out the _id mongoism and live with
.id as the one canonical way to address objects.
This commit modifies all users and providers of model._id to use
model.id instead. This patch works with or without Mongo removed first,
but will break Mongo usage (even more than before)
I have not bothered to fixup db.mongo.* and db.sql.convert
(which converts from Mongo to SQL)
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
| |
- Fixed error handling in OAuth plugin
- Changed request.POST file fields to request.files
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/media_types/image/processing.py
mediagoblin/media_types/video/__init__.py
mediagoblin/media_types/video/processing.py
mediagoblin/tests/test_submission.py
|
| |
| |
| |
| |
| |
| | |
- Added sniff handlers to all media plugins
All of them except audio returning False for ANYTHING
at the moment.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Move the actual celery task from processing/__init__.py
into its own .../task.py. That way it can be imported as
needed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To allow easier migration to the SQLAlchemy style .id give
the User and MediaEntry mongo classes an alias attribute of
.id that maps to ['_id'].
Use it in the upload process, because this was one of the
last positions with a ['_id'] instead of ._id (due to a bug
in mongokit).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The task_id is created anyway as a UUID. So it is very
unique per definition. The only thing needed for the queue
file path is a unique part.
Before the objectid of the MediaEntry was used instead. But
in the sql world the objectid is only available after an
"insert" on the db. And creating the queue_file_path
afterwards would require an "update" on the db. We can save
that. ... for now.
|
|/
|
|
|
|
|
|
|
|
|
| |
After a bit of discussion, we decided to drop the
pre-rendered html from the database and render it on
the fly.
In another step, we will use some proper caching method to
cache this stuff.
This commit affects the MediaEntry.description_html part.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These changes allow all of the rest of the code to use tags
in sql as they were used on mongo. It's not efficient at
all, as changing tags usually means to remove all old tags
and adding all new.
The only problem here is: Old slugs for tags are not
removed, because they're shared across all MediaTags and
dropping orphans is not always easy.
|
| |
|
|
|
|
|
| |
Make the license field in the forms optional and let them
properly be defaulted to "".
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\| |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Fixed broken test_auth test
- Fixed error handling on submission, it now raises the exception
if it is not explicitly relevant to file submission.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Added ASCII media processing
* Added ASCII media display
* Added ASCII media type
Rebased from Joar Wandborg's ascii art branch (squashed to remove the
commits borrowing code of dubious license)
Fixed a bug in file submission error handling:
- Moved file-extension condition out of loop (what did it do there?)
- Updated file submission tests
- Changed error handling in file submission, should now report more
than absolutely necessary.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Added handling of InvalidFileType to submit.views
- Updated test_celery_setup and test_submission tests to reflect the changes to the
media procesing infrastructure
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Removed debug output from init/celery
- Moved process_media/__init__ to processing.py
- Centralized the processing.ProcessMedia task class
- Updated media managers to reference the processing function
instead of the ProcessMedia instance
- Updated new-style image processing to previous, newer old-style
image processing
- Updated video transcoding
- Changed method in progress output, sometimes
message.structure['percent'] raises KeyError
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
mediagoblin/db/migrations.py
mediagoblin/submit/views.py
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* DONE Initially testing with arista
** DONE Video display templates
*** TODO Multi-browser support
** TODO Video thumbnails
** TODO Link to original video
** TODO Video cropping
Also contains a lot of "debug" print's
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For whatever reason, this does not work as expected:
entry._id = ObjectId()
Need to go this way:
entry['_id'] = ObjectId()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note: Migrations can't use "Dot Notation"!
Migrations run on pymongo, not mongokit.
So they can't use the "Dot Notation".
This isn't really a big issue, as migrations are anyway
quite mongo specific.
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/user_pages/views.py
mediagoblin/util.py
|
| | | | |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
|
|/ / |
|
| | |
|
|/
|
|
| |
tools/[file].py
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/edit/views.py
mediagoblin/templates/mediagoblin/user_pages/media.html
mediagoblin/user_pages/routing.py
|