From b5741b2373b7ddac3a68b77ba084ed3d4e6a66ae Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Wed, 9 Aug 2023 00:44:35 -0400 Subject: [PATCH] bug fix? --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 5532c3b..cdf7ed6 100644 --- a/main.py +++ b/main.py @@ -1861,7 +1861,6 @@ def main(): if clazz == "chapter": lecture_counter = 0 - lectures = [] chapter_index = entry.get("object_index") chapter_title = "{0:02d} - ".format(chapter_index) + sanitize_filename(entry.get("title")) @@ -1870,6 +1869,7 @@ def main(): counter += 1 elif clazz == "lecture": lecture_counter += 1 + lectures = [] lecture_id = entry.get("id") if len(udemy_object["chapters"]) == 0: # dummy chapters to handle lectures without chapters @@ -1891,6 +1891,7 @@ def main(): udemy_object["chapters"][counter]["lecture_count"] = len(lectures) elif clazz == "quiz": lecture_counter += 1 + lectures = [] lecture_id = entry.get("id") if len(udemy_object["chapters"]) == 0: # dummy chapters to handle lectures without chapters