diff --git a/modules/auto-schedule-pro-v2/main.py b/modules/auto-schedule-pro-v2/main.py index b77484f..84656a1 100644 --- a/modules/auto-schedule-pro-v2/main.py +++ b/modules/auto-schedule-pro-v2/main.py @@ -153,7 +153,7 @@ def get_human_readable_date(start_datetime, end_datetime, if ((current_day + 2) == int(start_datetime.strftime("%u"))) or \ ((current_day == 6) and (start_datetime.strftime("%u") == "1")): human_readable_date += "завтра " - elif current_week != int(start_datetime.strftime("%W")) % 2: + elif current_week != (int(start_datetime.strftime("%W")) + 1) % 2: human_readable_date += f"{WEEKDAYS_GENITIVE_NEXT[int(start_datetime.strftime('%u')) - 1]} " elif current_day != (int(start_datetime.strftime("%u")) - 1): human_readable_date += f"{WEEKDAYS_GENITIVE_THIS[int(start_datetime.strftime('%u')) - 1]} " @@ -256,14 +256,14 @@ def generate_lesson_description(lesson, start_datetime, end_datetime, current_da active_template = active_template.replace("%NAME_PREFIX%", custom_name_prefix) active_template = active_template.replace("%COLOR_CODE%", get_color_code(l['type'])) - if ('nolink' not in lesson) or (not lesson['nolink']): + if ('nolink' not in l) or (not l['nolink']): active_template = active_template.replace("%LINK%", l['link']) else: active_template = active_template.replace("%LINK%", "#") - if 'comment' in lesson: + if 'comment' in l: active_template += load_template(template, "comment") - active_template = active_template.replace("%COMMENT%", lesson["comment"]) + active_template = active_template.replace("%COMMENT%", l["comment"]) if "full" in overrides and overrides["full"]: active_template += "\n"