refactor: use video block utils from xblocks-contrib package (#38088)
* refactor: use bumper_utils from xblocks-contrib package * refactor: use video_handlers from xblocks-contrib package * fix: fix test_video_handlers test cases
This commit is contained in:
committed by
GitHub
parent
68a53b8506
commit
9b6445cb7b
@@ -29,6 +29,7 @@ from openedx.core.djangoapps.content_libraries.api import (
|
||||
add_library_block_static_asset_file,
|
||||
delete_library_block_static_asset_file,
|
||||
)
|
||||
from openedx.core.djangoapps.video_config.sharing_sites import sharing_sites_info_for_video
|
||||
from openedx.core.djangoapps.video_config.transcripts_utils import (
|
||||
Transcript,
|
||||
clean_video_id,
|
||||
@@ -93,7 +94,6 @@ class VideoConfigService:
|
||||
|
||||
organization = get_course_organization(course_key)
|
||||
|
||||
from openedx.core.djangoapps.video_config.sharing_sites import sharing_sites_info_for_video
|
||||
sharing_sites_info = sharing_sites_info_for_video(
|
||||
public_video_url,
|
||||
organization=organization
|
||||
|
||||
@@ -28,6 +28,7 @@ from xmodule.contentstore.content import StaticContent
|
||||
from xmodule.contentstore.django import contentstore
|
||||
from xmodule.exceptions import NotFoundError
|
||||
|
||||
from xblocks_contrib.video.bumper_utils import get_bumper_settings
|
||||
from xblocks_contrib.video.exceptions import TranscriptsGenerationException
|
||||
|
||||
|
||||
@@ -786,11 +787,6 @@ class VideoTranscriptsMixin:
|
||||
is_bumper(bool): If True, the request is for the bumper transcripts
|
||||
include_val_transcripts(bool): If True, include edx-val transcripts as well
|
||||
"""
|
||||
# TODO: This causes a circular import when imported at the top-level.
|
||||
# This import will be removed as part of the VideoBlock extraction.
|
||||
# https://github.com/openedx/edx-platform/issues/36282
|
||||
from xmodule.video_block.bumper_utils import get_bumper_settings
|
||||
|
||||
if is_bumper:
|
||||
transcripts = copy.deepcopy(get_bumper_settings(self).get('transcripts', {}))
|
||||
sub = transcripts.pop("en", "")
|
||||
|
||||
Reference in New Issue
Block a user