Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e457135e
Commit
e457135e
authored
Mar 13, 2014
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2931 from edx/alex/allow_uppercase_srt_extension
Allow uppercase transcripts srt extension.
parents
891cf8bb
7fe675b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
cms/djangoapps/contentstore/tests/test_transcripts_utils.py
+3
-2
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
+1
-1
No files found.
cms/djangoapps/contentstore/tests/test_transcripts_utils.py
View file @
e457135e
...
...
@@ -308,8 +308,9 @@ class TestGenerateSubsFromSource(TestDownloadYoutubeSubs):
"""
)
self
.
clear_subs_content
(
youtube_subs
)
# Check transcripts_utils.TranscriptsGenerationException not thrown
transcripts_utils
.
generate_subs_from_source
(
youtube_subs
,
'srt'
,
srt_filedata
,
self
.
course
)
# Check transcripts_utils.TranscriptsGenerationException not thrown.
# Also checks that uppercase file extensions are supported.
transcripts_utils
.
generate_subs_from_source
(
youtube_subs
,
'SRT'
,
srt_filedata
,
self
.
course
)
# Check assets status after importing subtitles.
for
subs_id
in
youtube_subs
.
values
():
...
...
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
View file @
e457135e
...
...
@@ -213,7 +213,7 @@ def generate_subs_from_source(speed_subs, subs_type, subs_filedata, item, langua
:returns: True, if all subs are generated and saved successfully.
"""
_
=
item
.
runtime
.
service
(
item
,
"i18n"
)
.
ugettext
if
subs_type
!=
'srt'
:
if
subs_type
.
lower
()
!=
'srt'
:
raise
TranscriptsGenerationException
(
_
(
"We support only SubRip (*.srt) transcripts format."
))
try
:
srt_subs_obj
=
SubRipFile
.
from_string
(
subs_filedata
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment