diff options
author | Jayaram Pai | 2013-12-17 17:02:52 +0530 |
---|---|---|
committer | Jayaram Pai | 2013-12-17 17:02:52 +0530 |
commit | 11a676c7c97f71476c45857ed8dc7476427ce24c (patch) | |
tree | d978ae7e8358600f4be01168a2badb6295a015ca /website | |
parent | e1cbb36f04415ecf8311619a7600273389d66ee5 (diff) | |
download | FOSSEE-Forum-11a676c7c97f71476c45857ed8dc7476427ce24c.tar.gz FOSSEE-Forum-11a676c7c97f71476c45857ed8dc7476427ce24c.tar.bz2 FOSSEE-Forum-11a676c7c97f71476c45857ed8dc7476427ce24c.zip |
spoken-tutorial video path updated
Diffstat (limited to 'website')
-rw-r--r-- | website/views.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/website/views.py b/website/views.py index de4d592..fb19a54 100644 --- a/website/views.py +++ b/website/views.py @@ -203,7 +203,18 @@ def ajax_duration(request): if request.method == 'POST': category = request.POST['category'] tutorial =request.POST['tutorial'] - video_info = get_video_info('/home/cheese/test-video.ogv') + video_detail = TutorialDetails.objects.using('spoken').get( + Q(foss_category=category), + Q(tutorial_name=tutorial) + ) + video_resource = TutorialResources.objects.using('spoken').get( + Q(tutorial_detail_id=video_detail.id), + Q(language='English') + ) + video_path = '/Sites/spoken_tutorial_org/sites/default/files/{}'.format( + video_resource.tutorial_video + ) + video_info = get_video_info(video_path) # convert minutes to 1 if less than 0 # convert seconds to nearest upper 10th number eg(23->30) |