From 14c7c5086efd97cd54bd9e5d06c705b82fc3e09a Mon Sep 17 00:00:00 2001 From: Fred Smith Date: Thu, 16 Nov 2017 11:48:53 -0500 Subject: [PATCH] be able to configure default video cdn url --- common/lib/xmodule/xmodule/video_module/video_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index 50dcb950cd..b520b5bee6 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -216,7 +216,8 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, # Determine if there is an alternative source for this video # based on user locale. This exists to support cases where # we leverage a geography specific CDN, like China. - cdn_url = getattr(settings, 'VIDEO_CDN_URL', {}).get(self.system.user_location) + default_cdn_url = getattr(settings, 'VIDEO_CDN_URL', {}).get('default') + cdn_url = getattr(settings, 'VIDEO_CDN_URL', {}).get(self.system.user_location, default_cdn_url) # If we have an edx_video_id, we prefer its values over what we store # internally for download links (source, html5_sources) and the youtube