Commit graph

2491 commits

Author SHA1 Message Date
j
d16bbf6ba8 remove facet duplicates 2015-10-12 18:44:20 +01:00
j
c17f0a4376 add new file for r5049 2015-10-12 18:43:41 +01:00
j
aafac3c1d8 only store one item/key/value facet, remove facets with other case 2015-10-12 17:45:08 +02:00
rolux
69254bbe48 changeid can also be list of ids, use text 2015-10-12 15:25:24 +01:00
rolux
4ed2d940cf migrate annotation sequence in item not annotation 2015-10-12 15:24:03 +01:00
j
2e3b61d163 dont fail if files are already gone 2015-10-04 18:17:34 +01:00
j
6f4c010be0 only return layers defined in config 2015-10-04 14:11:39 +01:00
j
be1589569e fix clip index for newly added clips 2015-10-04 11:04:46 +01:00
j
5649892bbd annotation layer flag is boolean 2015-10-04 11:20:45 +02:00
9265b8a53b Clip.save: fetch annotations once, not ~ 2 * n_layers
With 17 layers and 12 clipLayers, this repeated fetching was around 49%
of the cost of this function, which was in turn 94% of the cost of
creating many new annotations with mostly-unique endpoints. This helps a
bit...

If the order of clipLayers is not meant to be significant to sortvalue
(which I assume it is) then this could be simpler.
2015-10-04 11:17:22 +02:00
j
a430c6bdf4 make facets case insensitive 2015-09-25 14:44:02 +01:00
j
1e81dc4fa1 switch 2015-09-24 18:35:13 +01:00
j
79dbeabafc not again 2015-09-24 18:26:59 +01:00
j
eea9321b2e not not not 2015-09-24 18:23:25 +01:00
j
96301d6a9c not 2015-09-24 18:21:01 +01:00
j
f12dfdc4a3 import subtitles if no subtitles exist 2015-09-24 18:16:29 +01:00
j
65fb9ccb6d reduce ffmpeg output 2015-09-16 15:04:44 +01:00
4f064fda76 Make Annotation.public_id non-NULLable (fixes #2829)
This fixes this race:

     request 1                          request 2
     -----------------------------      -------------------------
     addAnnotation(...)
     super(Annotation.self).save()
                                        findAnnotations(...)
                                        returns [{id: null, ...}]
     annotation.public_id = x
     returns {id: x}
2015-09-14 14:18:10 +02:00
eaa07b1ccb ClipManager: match annotation layer case-sensitively (fixes #2832)
The case must be correct anyway for the layer to be found in
settings.CONFIG['layers']. Running this:

    Q(annotation__layer__iexact='foo') &
    Q(annotation__findvalue__icontains='bar')

compiles to

    upper(layer) = upper('foo') and
    ...

which can't use the case-sensitive annotation_annotation_layer index.
This:

    Q(annotation__layer__exact='foo') &
    Q(annotation__findvalue__icontains='bar')

can. (It still can't use the findvalue_like index, though! The other
option is to add indices on upper(layer) and upper(findvalue)
[varchar_pattern_ops].)
2015-09-14 14:13:06 +02:00
da1ad5b9c1 ClipManager.filter_annotations: fix 'opterator' typo (fixes #2832) 2015-09-14 14:11:40 +02:00
8759b569da Cache serialized entities when fetching many annotations
For a scene with ~5600 annotations, of which ~3100 are entities, this
cuts fetching the scene from 12 seconds to 2 seconds.
2015-09-14 14:08:02 +02:00
eebb0b5681 Combine {Item,Clip,edit.Clip}.get_layers()
This has several benefits:

    • Clip.get_layers() (used by smart edits) and Item.get_layers() pick up
    the select_related('user') optimization added for static edits in
    r5007.

    • Static edits and items pick up the optimization from r4941 to select
    annotations once, not once per layer.

Fetching an item with ~1000 annotations took ~1s without this patch,
~0.34s with this patch. Another item with ~6000 annotations took ~11.6s
before, ~8.6s after.

Because this block is moved out to the top:

if user and user.is_anonymous():
user = None

then, for anonymous users,

"editable": false,

is no longer included in the annotations. The old behaviour ended up
including this key in all layers listed before the first private layer
in the config, and leaving it out from later ones. So this new behaviour
is more consistent.
2015-09-14 14:06:43 +02:00
j
2c406a76e0 create trusty container 2015-09-03 19:33:48 +02:00
j
fd2992c588 add option to sort by number of annotations per layer 2015-09-03 00:52:20 +02:00
ace04688f2 Entity.save(): update annotations async (fixes #2827, kinda) 2015-09-02 14:32:16 +02:00
j
41b50ccdb8 add canPlayClips flag to annotation layers and use those layers to limit playback to clips 2015-08-27 11:27:27 +02:00
j
83013bbe5e Update items when entities are renamed (fixes #2825) 2015-08-26 19:42:03 +02:00
j
944fe1a9dd only run migration if we have items 2015-08-07 17:32:17 +02:00
3da3bd37fd addClips: return error if item/in/out missing, not 500 2015-08-07 13:37:56 +02:00
j
819181726a slightly faster json serialization of annotations 2015-08-02 16:22:45 +02:00
f3fdded07d Edit.json: preload annotation users
The expensive part of fetching an edit is JSONifying the clips'
annotations. Profiling showed that the main cost was Annotation.json(),
and within that:

File: /srv/pandora/pandora/annotation/models.py
Function: json at line 216

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
216                                               def json(self, layer=False, keys=None, user=None):
217       632          827      1.3      0.1          j = {
218       632      1048170   1658.5     89.6              'user': self.user.username,
219                                                   }

Obviously this join just moves some of the cost further out, but it
brings my micro-benchmark down from 1.3s to 0.3s.
2015-08-02 16:02:47 +02:00
ab5a20d3a2 Treat findEdits({}) like findEdits({query: {}}) (fixes #2820) 2015-07-22 21:37:55 +02:00
d3c18a5859 editAnnotation: explicitly refuse to change layer, fixes #2818 2015-07-14 10:48:05 +02:00
1ef7101761 annotations: fix 'unkown' typo 2015-07-14 10:47:00 +02:00
j
5e6b054896 extend cookie age if its still used 2015-06-30 20:02:09 +02:00
j
9208e09dd2 sync config documentation 2015-06-26 07:27:56 +00:00
j
1a2f051bdd fix documentation update 2015-06-26 07:27:13 +00:00
j
9758b7d312 fail if entity is unknown 2015-06-24 16:41:49 +02:00
j
ce701d38d0 space 2015-06-24 16:41:11 +02:00
j
adb831ce70 dont turn data into string, fixes #2797 2015-05-28 13:10:39 +02:00
j
5da83f6f6d don't return empty string for undefined values, handle in context browser 2015-05-23 15:11:18 +05:30
j
0504eaf227 audio files should not have aspect ratio 2015-05-23 15:10:24 +05:30
j
9191a9c196 extension should be lowercase 2015-05-23 11:06:22 +02:00
j
27e9bc62fb typo 2015-05-23 14:25:58 +05:30
j
23398c4307 get resolution from videos while uploading and dont return sort value 2015-05-23 14:22:44 +05:30
j
7359a24d78 keep video height if its < profile height 2015-05-22 19:01:05 +05:30
8b0459592c logError: log HTTP_USER_AGENT
include user agent in error text
2015-05-20 12:38:49 +02:00
3ad9d4821b Fix findEntities( ... name == x ... ), fixes #2769 2015-05-20 12:30:31 +02:00
fe7f961ff6 Entity: fix name_find when alternativeNames is non-empty
Previously, given:

    name = "foo"
    alternativeNames = ("bar", "baz")

then:

    name_find = '||foobar||baz||'
2015-05-20 12:16:32 +02:00
b7a83554ab Fix references to findDocument[s] in docstrings 2015-05-20 12:14:21 +02:00
j
f11772b8db fix annotations without public_id after initializing sequence 2015-05-20 01:04:42 +05:30
j
ef56f4aec4 track annotation id in table to avoid IntegrityErrors while adding multiple annotations to one item, fixes #2780 2015-05-20 00:43:33 +05:30
j
34f2cfe290 avoid updating item if another annotation was added or edited since dispatching the update_item event 2015-05-20 00:20:50 +05:30
j
47a3a24a7d ignore messages that can not be serialized 2015-05-19 02:39:26 +05:30
j
af86445b2e use username not user 2015-05-18 23:01:19 +02:00
j
6dd9522cc5 never include empty layers 2015-05-13 21:59:17 +02:00
j
562a506d68 include user in change event 2015-05-08 08:39:31 +02:00
f9ba4d1bf1 findChangeLog: don't crash if sort is unspecified
This would crash:

    api.findChangeLogs(keys=[])

because there's no 'name' key for changelog entries. Instead, default to
chronological order, newest first.
2015-05-06 19:00:44 +02:00
514e1ad36d autocompleteEntities: fix lies in docstring 2015-04-30 22:49:31 +02:00
4d6466779f autocomplete: fix typo in docstring 2015-04-30 22:48:07 +02:00
j
e7f83f674e add inital implementation for a websocket, disabled by default for now 2015-04-28 23:05:15 +05:30
j
7aa609c246 make sure app.tasks gets loaded 2015-04-28 22:34:45 +05:30
c2e7ac3190 signup: fix error documentation, require email
email is required by the UI, and if you don't provide
it this method raises KeyError anyway.
2015-04-28 18:13:25 +02:00
51c3df9660 typo: permissino permission in 403 errors 2015-04-28 18:12:00 +02:00
j
d39c237b04 ignore subtitles that are longer than the video. 2015-04-25 19:18:32 +02:00
j
abf445b7f1 faster edits 2015-04-25 19:02:34 +02:00
j
e666159811 faster find queries 2015-04-25 19:02:20 +02:00
j
9197591bb6 tune smart clip queries 2015-04-25 16:13:42 +02:00
j
e604ba73bd remove debug output 2015-04-25 13:08:24 +02:00
j
8abed26dc9 make sure alternative names are unique too, also fixes #2754 2015-04-23 17:20:00 +05:30
j
5b7b389661 ignore case checking for existing entities, check for alternative names too, migrate existing double entries, fixes #2754 2015-04-23 12:55:11 +02:00
j
9d3c50fcec ignore undefined entity data 2015-04-21 15:34:37 +05:30
j
0b103afeca minify before overwriting old file; oxjs removes old tree, always build geo 2015-04-18 16:06:56 +05:30
rolux
2ad4aad1c5 fix typo in config documentation 2015-04-20 10:48:04 +02:00
rolux
442e847747 fix typo in config documentation 2015-04-20 10:47:35 +02:00
rolux
3208db2fb0 update config documentation 2015-04-20 10:46:00 +02:00
j
2dc081b8aa store name, remove unused keys 2015-04-17 16:01:49 +01:00
j
10183a9f06 only create index in sqlfindindex not during migration 2015-04-17 11:34:44 +01:00
j
9cbf62267f split data migration into extra step 2015-04-17 11:26:56 +01:00
j
e407db4605 fix sqlfindindex 2015-04-17 11:22:34 +01:00
j
a869c7a89a extend findEntities to support entity keys and * 2015-04-17 11:17:12 +01:00
j
e851dcabfb entities are not links 2015-04-16 20:02:31 +00:00
j
c59fb1596f fix entities with ' in name 2015-04-16 20:50:59 +05:30
j
1fb075a350 rename layer 2015-04-16 10:53:05 +01:00
j
ff5d9633ce add db index on changelog.created 2015-04-15 15:00:52 +05:30
j
5e8294b1c0 function to merge two users 2015-04-15 14:59:42 +05:30
j
6793c165b3 refactor filters updates 2015-04-15 08:51:34 +01:00
j
6a5280edd4 ignore case for annotatoin filter values 2015-04-14 23:04:07 +01:00
j
2325c71c21 fix limit by created 2015-04-14 20:13:19 +01:00
rolux
71fd1314cf document new layer/autocomplete config option 2015-04-14 19:59:18 +01:00
j
3e0bd078d0 pass autocomplete with layer, support autocomplete for leyers with filters, fixes #2736 2015-04-14 19:49:22 +01:00
j
c73ac10ed4 log addEntity in changelog 2015-04-14 19:15:59 +01:00
j
ae55130f47 add subtitles offset, fixes #2732 2015-04-14 15:53:47 +01:00
j
083fabc208 include first annotation as annotation id for clips 2015-04-02 13:43:46 +02:00
j
ea52722d9f show date instead of undefined in results grid, fixes #2727 2015-03-29 22:54:05 +05:30
j
253125e3c6 pad.ma does not have year 2015-03-28 14:27:55 +01:00
j
7b401cfe28 round duration to 3 2015-03-26 20:28:07 +05:30
j
bf1dde53d6 fix ignoring media files without instances 2015-03-23 11:27:34 +05:30
j
15e2f1e844 exit on error 2015-03-20 05:31:05 +00:00
9ac5dc7ba9 [PATCH] Fix find()'s docs on nested subconditions
The documentation says that you need to write (P & Q) | R
like this:

{
    'conditions': [
        {
            'query': {
                'conditions': [P, Q],
                'operator': '&'
            }
        },
        R
    ],
    'operator': '|'
}

but actually you need to omit the { 'query': ... } wrapping the
subclause. Including it crashes parseCondition() at:

    v = condition['value']

for the obvious reason.
2015-03-05 14:17:02 +05:30
j
1ed91da4e0 fix import 2015-02-26 06:07:18 +00:00
j
deda6252f1 keep entity annotation find/sort values in sync with entities 2015-02-26 06:04:16 +00:00
j
7377de62f7 remove all sessions of user on signout, fixes #2700 2015-02-25 18:17:35 +00:00
j
90a49b2a4d ui.onload -> user.script, fixes #2697 2015-02-21 10:32:48 +00:00
j
441cb9892a allow updates of file metadata for files with info 2015-02-21 15:35:01 +05:30
j
6693bfcd0f return document or 404 no 500 2015-02-20 15:13:23 +00:00
j
2a63a3b300 dont include null values in lookup 2015-02-16 16:12:44 +00:00
j
484b33e39d add option to return item keys in findAnnotation 2015-02-16 16:10:45 +00:00
j
2e246dd06e cleanup 2015-02-16 16:02:18 +00:00
j
7ae02d5678 implement lookup 2015-02-16 16:00:26 +00:00
j
a2e23739b8 return id in response, fixes #2058 2015-02-14 18:29:58 +00:00
j
f144a020ec typo 2015-02-13 17:32:12 +00:00
j
f7bbcf027a fix findvalue for entity annotations 2015-02-13 15:22:14 +00:00
j
ccfaa7db4a add entity/document relation 2015-02-13 11:06:09 +00:00
j
f680d8613e make sure sortvalue is lowercase, fixes #2667 2015-02-06 12:12:32 +00:00
j
b5212f2662 add leading word matches, fixes #2663 2015-02-06 15:16:41 +05:30
j
ad8db3a293 return html value for entities 2015-02-06 15:11:19 +05:30
j
d492619be6 entity names are only unique by type 2015-02-06 12:42:19 +05:30
j
c1066ad7f1 user agent might not be set 2015-02-06 11:08:10 +05:30
j
243c1958c1 dont import empty subtitles 2015-02-06 10:57:14 +05:30
j
ed5bc510a9 ignore subtitles with in > out 2015-02-05 18:29:18 +05:30
j
ea6a79cc10 always use ui.part.documents and ui.part.entities, remove ui.document/ui.entity from default config, fixes #2064 2015-02-05 15:57:37 +05:30
j
809486b43c cropped thumbnails of image documents 2015-02-05 08:08:28 +00:00
j
9273d7b3ba make subtitles in/out/value unique before importing 2015-02-04 15:56:37 +05:30
j
9a3c24b2ab only call update_timeline once during first import, adds empty clips twice otherwise 2015-02-04 15:10:51 +05:30
j
4ed0d56f4f add mkv cues to audio only files to fix seeking in firefox 2015-02-04 00:09:22 +05:30
j
28e8676f33 add ui.part.entities to config 2015-02-03 23:20:35 +05:30
j
437391caf9 load info from stream in file has no info 2015-02-03 23:20:16 +05:30
j
83393ee385 name must be unicode 2015-02-03 18:44:05 +01:00
j
f1f9c7369b fix default itemview for existing lists 2015-01-29 08:54:27 +00:00
j
bb1f17e241 fix default list view 2015-01-29 14:10:32 +05:30
j
5810efbc4a limit canEditFeatured* to staff/admin 2015-01-25 11:23:32 +05:30
j
5347c2e619 dont fail if condition does not have a value 2015-01-24 16:00:24 +05:30
j
708e6e5b2c fixx add movie 2015-01-24 15:49:57 +05:30
j
5dc7564b4f make init_db less verbose 2015-01-19 18:03:10 +00:00
j
bf65abae55 turn database initialization into a manage.py command 2015-01-19 16:34:21 +01:00
j
6cd2eaf93a extract some information about currently running encoding jobs 2015-01-08 17:01:03 +01:00
j
e1bc418e0c use one version of ffmpeg for all tasks, remove avconv dependency, fixes #2606 2015-01-05 16:07:55 +00:00
j
9efd77724d add option to select default view for list in dialog and use if user has no list settings, fixes #2636 2015-01-02 00:26:04 +01:00
j
24f81cdeae add item as valid key for findAnnotations 2014-12-28 11:39:08 +01:00
j
f1db36dd26 dont fail with no added annotations 2014-12-23 15:21:05 +00:00
j
3b8abd7d23 fix editing annotation in/out 2014-12-26 13:00:54 +00:00
j
6741ae85e6 add default values for entities to conifg.*.json 2014-12-26 12:43:49 +00:00
j
913599697e entities can be empty 2014-12-26 12:19:36 +00:00
j
139a5e3722 handle cut issues 2014-12-23 12:49:59 +00:00
rolux
ca197eafaf update config docs 2014-12-23 12:38:22 +00:00
j
6662872225 remove unused import 2014-12-23 11:28:42 +00:00
rolux
2e3d828b08 config bug 2014-12-23 11:27:05 +00:00
j
4c582c14b5 better related name 2014-12-22 14:29:30 +00:00
j
dc1cd6e410 remove videoprefix from config, defined by backend 2014-12-22 10:51:13 +00:00