Update Saqel Platform: 2026-09-02 07:52:23
This commit is contained in:
@@ -127,10 +127,10 @@ class CurriculumRepository {
|
||||
}
|
||||
|
||||
/// Fetch lesson playback details (streams, checkpoints, and versions) from Live API
|
||||
Future<LessonPlaybackData> getLessonPlayback(String lessonId, {String? subjectId, String? unitId}) async {
|
||||
AppLogger.log('Fetching live playback data for lesson $lessonId from /api/lessons/$lessonId/playback...', tag: 'CURRICULUM_REPO');
|
||||
Future<LessonPlaybackData> getLessonPlayback(String curriculumKey, {String? subjectId, String? unitId}) async {
|
||||
AppLogger.log('Fetching live playback data for curriculum key $curriculumKey...', tag: 'CURRICULUM_REPO');
|
||||
|
||||
final res = await _api.get('/api/lessons/$lessonId/playback');
|
||||
final res = await _api.get('/api/lessons/playback', queryParams: {'curriculum_key': curriculumKey});
|
||||
if (res is Map && res['data'] != null) {
|
||||
return LessonPlaybackData.fromJson(Map<String, dynamic>.from(res['data']));
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class VideoPlaybackCubit extends Cubit<VideoPlaybackState> {
|
||||
AppLogger.log('Loading Socratic playback for lesson: ${lesson.title}', tag: 'VIDEO_CUBIT');
|
||||
emit(VideoPlaybackLoading());
|
||||
try {
|
||||
final playback = await _repo.getLessonPlayback(lesson.id, subjectId: subject?.id);
|
||||
final playback = await _repo.getLessonPlayback(lesson.markdownFilePath ?? lesson.id, subjectId: subject?.id);
|
||||
emit(VideoPlaybackReady(
|
||||
playbackData: playback,
|
||||
lessonItem: lesson,
|
||||
|
||||
Reference in New Issue
Block a user