diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index 4f481edf..baeb11d5 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -387,7 +387,7 @@ "type": "integer", "capability": "canSeeFiles", "columnWidth": 60, - "format": {"type": "unit", "args": ["kbps"]} + "format": {"type": "value", "args": ["bps"]} }, { "id": "parts", @@ -538,7 +538,7 @@ {"id": "movies_with_clips", "title": "Movies with Clips", "query": {"conditions": [{"key": "canPlayClips", "value": true, "operator": "="}], "operator": "&"}}, {"id": "no_tv_series", "title": "No TV Series", "query": {"conditions": [{"key": "isSeries", "value": false, "operator": "="}], "operator": "&"}} ], - "rightsLevel": {"member": 5, "staff": 4, "admin": 3}, + "rightsLevel": {"member": 4, "staff": 3, "admin": 2}, "rightsLevels": [ {"name": "Public", "color": [128, 255, 128]}, {"name": "Relaxed", "color": [192, 255, 128]}, diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 8391f3a5..fd6aeb20 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -500,7 +500,7 @@ class Stream(models.Model): def json(self): return { 'duration': self.duration, - 'aspectRatio': self.aspect_ratio, + 'aspectratio': self.aspect_ratio, } def delete_stream(sender, **kwargs): diff --git a/pandora/clip/models.py b/pandora/clip/models.py index f5444356..696b6d98 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -88,7 +88,10 @@ class Clip(models.Model): for a in self.annotations.filter(layer__name=layer)] for key in keys: if key not in clip_keys and key not in j: - j[key] = self.item.get(key) + value = self.item.get(key) + if not value and hasattr(self.item.sort, key): + value = getattr(self.item.sort, key) + j[key] = value return j @classmethod diff --git a/pandora/item/models.py b/pandora/item/models.py index ec54b5f4..57a16f34 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -168,6 +168,8 @@ class Item(models.Model): objects = managers.ItemManager() def get(self, key, default=None): + if key == 'rightslevel': + return self.level if self.data and key in self.data: return self.data[key] if self.external_data and key in self.external_data: @@ -460,6 +462,7 @@ class Item(models.Model): i['parts'] = len(i['durations']) if i['parts']: i['videoRatio'] = streams[0].aspect_ratio + i['resolution'] = (streams[0].file.width, streams[0].file.height) #only needed by admins if keys and 'posters' in keys: @@ -654,7 +657,7 @@ class Item(models.Model): s.published = self.published s.rightslevel = self.level - s.aspectratio = self.get('aspectRatio') + s.aspectratio = self.get('aspectratio') s.words = sum([len(a.value.split()) for a in self.annotations.exclude(value='')]) s.clips = self.clips.count() diff --git a/static/js/pandora/infoView.js b/static/js/pandora/infoView.js index 0ef654a8..6abcebd1 100644 --- a/static/js/pandora/infoView.js +++ b/static/js/pandora/infoView.js @@ -646,8 +646,8 @@ pandora.ui.infoView = function(data) { return image.selected; })[0]; $list = Ox.IconList({ - defaultRatio: ui.icons == 'posters' ? 5/8 : data.stream.aspectRatio, - fixedRatio: ui.icons == 'posters' ? false : data.stream.aspectRatio, + defaultRatio: ui.icons == 'posters' ? 5/8 : data.stream.aspectratio, + fixedRatio: ui.icons == 'posters' ? false : data.stream.aspectratio, item: function(data, sort, size) { var ratio = data.width / data.height; size = size || 128;