videoprefix

This commit is contained in:
j 2011-10-27 12:07:44 +02:00
parent e97a1b8e24
commit bf62056bb2
4 changed files with 8 additions and 2 deletions

View file

@ -557,7 +557,8 @@
// fixme: there should be no magic applied to this file
"id": "{{settings.SITEID}}",
"name": "{{settings.SITENAME}}",
"url": "{{settings.URL}}"
"url": "{{settings.URL}}",
"videoprefix": ""
},
"sitePages": [
{"id": "about", "title": "About"},

View file

@ -28,6 +28,7 @@ def load_config():
config['site']['name'] = settings.SITENAME
config['site']['sectionName'] = settings.SITENAME
config['site']['url'] = settings.URL
config['site']['videoprefix'] = settings.VIDEO_PREFIX
config['keys'] = {}
for key in config['itemKeys']:

View file

@ -75,9 +75,13 @@ MEDIA_ROOT = normpath(join(PROJECT_ROOT, '..', 'data'))
STATIC_ROOT = normpath(join(PROJECT_ROOT, '..', 'static'))
TESTS_ROOT = join(PROJECT_ROOT, 'tests')
#if videos are served from another subdomain
VIDEO_PREFIX = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/data/'
STATIC_URL = '/static/'

View file

@ -64,7 +64,7 @@ pandora.ui.item = function() {
});
pandora.site.video.resolutions.forEach(function(resolution) {
video[resolution] = Ox.range(result.data.parts).map(function(i) {
return '/' + pandora.user.ui.item + '/'
return pandora.site.site.videoprefix + '/' + pandora.user.ui.item + '/'
+ resolution + 'p' + (i + 1) + '.' + pandora.user.videoFormat;
});
});