Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ def test_calendar_name():
)
cal_str = cal.serialize()
assert "NAME:My Second Calendar" in cal_str
assert cal_str.count("NAME:") == 1
assert cal_str.count("\nNAME:") == 1

assert "X-WR-CALNAME:My Second Calendar" in cal_str
assert cal_str.count("\nX-WR-CALNAME:") == 1


def test_repeat():
Expand Down
1 change: 1 addition & 0 deletions yaml2ics.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def files_to_calendar(files: list) -> ics.Calendar:
calendar = events_to_calendar(all_events)
if name is not None:
calendar.extra.append(ics.ContentLine(name="NAME", value=name))
calendar.extra.append(ics.ContentLine(name="X-WR-CALNAME", value=name))
return calendar


Expand Down