From f9634168d4068c83572798d74c8f43f1755a1eb2 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Wed, 9 Aug 2023 00:49:53 -0400 Subject: [PATCH] Revert "bug fix?" This reverts commit 0ab68cb95f97f05c5ef62309c5775ab4280efd58. --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index cdf7ed6..5532c3b 100644 --- a/main.py +++ b/main.py @@ -1861,6 +1861,7 @@ 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")) @@ -1869,7 +1870,6 @@ 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,7 +1891,6 @@ 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