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:
Muhammad Farhan Khan
2026-03-09 17:13:16 +05:00
committed by GitHub
parent 68a53b8506
commit 9b6445cb7b
9 changed files with 14 additions and 716 deletions

View File

@@ -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

View File

@@ -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", "")