fix(playback): isolate curriculum keys and prevent non-uploaded lessons from falling back to previous video
This commit is contained in:
@@ -235,17 +235,14 @@ class CurriculumLessonItemModel {
|
||||
|
||||
// Video availability:
|
||||
// 1. Live server enriched: json['has_video'] == true or json['video_url'] is present
|
||||
// 2. Unit 1 Math 10 lessons (Intro, Lesson 1, Lesson 2) uploaded by teacher are fully available
|
||||
// 2. Exact uploaded lessons in Grade 10 Math Unit 1 (Intro, Lesson 1, Lesson 2)
|
||||
final bool hasVideoExplicit = (json['has_video'] == true) ||
|
||||
(json['video_url'] != null && json['video_url'].toString().isNotEmpty) ||
|
||||
(filePath != null && (
|
||||
filePath.contains('math_10/semester_1/unit_01') ||
|
||||
filePath.contains('intro_and_project') ||
|
||||
filePath.contains('lesson_01') ||
|
||||
filePath.contains('lesson_02')
|
||||
)) ||
|
||||
((json['title']?.toString() ?? '').contains('معادلات')) ||
|
||||
((json['title']?.toString() ?? '').contains('مقدمة ومشروع'));
|
||||
filePath.contains('math_10/semester_1/unit_01/intro_and_project') ||
|
||||
filePath.contains('math_10/semester_1/unit_01/lesson_01') ||
|
||||
filePath.contains('math_10/semester_1/unit_01/lesson_02')
|
||||
));
|
||||
|
||||
return CurriculumLessonItemModel(
|
||||
id: stableId,
|
||||
|
||||
Reference in New Issue
Block a user