forked from 0x2620/pandora
editRatio->videoRatio
This commit is contained in:
parent
92d24342fd
commit
5905336eac
1 changed files with 2 additions and 2 deletions
|
@ -188,12 +188,12 @@ def getEmbedDefaults(request):
|
||||||
document: str // first document, sorted by id
|
document: str // first document, sorted by id
|
||||||
edit: str // first edit, sorted by name
|
edit: str // first edit, sorted by name
|
||||||
editDuration: float // duration of that edit
|
editDuration: float // duration of that edit
|
||||||
editRatio: float // pandora.site.video.previewRatio
|
|
||||||
item: str // first item, sorted by id
|
item: str // first item, sorted by id
|
||||||
itemDuration: float // duration of that item
|
itemDuration: float // duration of that item
|
||||||
itemRatio: float // video ratio of that item
|
itemRatio: float // video ratio of that item
|
||||||
list: str // first list, sorted by name
|
list: str // first list, sorted by name
|
||||||
text: str // first text, sorted by name
|
text: str // first text, sorted by name
|
||||||
|
videoRatio: float // pandora.site.video.previewRatio
|
||||||
videoResolution: int // largest value in pandora.site.video.resolutions
|
videoResolution: int // largest value in pandora.site.video.resolutions
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
@ -212,7 +212,6 @@ def getEmbedDefaults(request):
|
||||||
e = qs[0].json(keys=['id', 'duration'])
|
e = qs[0].json(keys=['id', 'duration'])
|
||||||
response['data']['edit'] = e['id']
|
response['data']['edit'] = e['id']
|
||||||
response['data']['editDuration'] = e['duration']
|
response['data']['editDuration'] = e['duration']
|
||||||
response['data']['editRatio'] = settings.CONFIG['video']['previewRatio']
|
|
||||||
level = settings.CONFIG['capabilities']['canSeeItem']['guest']
|
level = settings.CONFIG['capabilities']['canSeeItem']['guest']
|
||||||
qs = Item.objects.filter(level__lte=level, rendered=True).order_by('sort__itemId')
|
qs = Item.objects.filter(level__lte=level, rendered=True).order_by('sort__itemId')
|
||||||
if qs.exists():
|
if qs.exists():
|
||||||
|
@ -224,6 +223,7 @@ def getEmbedDefaults(request):
|
||||||
if qs.exists():
|
if qs.exists():
|
||||||
i = qs[0].json()
|
i = qs[0].json()
|
||||||
response['data']['list'] = i['id']
|
response['data']['list'] = i['id']
|
||||||
|
response['data']['videoRatio'] = settings.CONFIG['video']['previewRatio']
|
||||||
response['data']['videoResolution'] = max(settings.CONFIG['video']['resolutions'])
|
response['data']['videoResolution'] = max(settings.CONFIG['video']['resolutions'])
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(getEmbedDefaults)
|
actions.register(getEmbedDefaults)
|
||||||
|
|
Loading…
Reference in a new issue