thunderbird / thunderbird-website

Build code for the websites on thunderbird.net and start.thunderbird.net
https://www.thunderbird.net
151 stars 76 forks source link

Unique ids in Holiday Calendars aren't unique, which breaks import in Thunderbird #640

Closed Sancus closed 1 month ago

Sancus commented 2 months ago

https://github.com/thunderbird/thunderbird-website/blob/master/calgen/models/Calendar.py#L48

This line is supposed to produce a unique id, but it doesn't, because the value that Calendarific returns as 'urlid' isn't even kinda unique, it's just the name of the country+holiday, and there can be a zillion duplicates of a single holiday name because of different versions of the holiday in different states(for example, this occurs in the USHolidays.ics).

According to the API docs, the Premium API, which we should have access to, supports requesting a UUID for each event, so maybe we can use that?

MelissaAutumn commented 2 months ago

https://github.com/thunderbird/thunderbird-website/blob/master/calgen/providers/CalendarificProvider.py#L29

I think we can add uuid: True to the payload. There may have been a reason I didn't use it but I can't remember. Hopefully an easy fix.

MelissaAutumn commented 1 month ago

Should be fixed with https://github.com/thunderbird/thunderbird-website/commit/1e04ebe0544e43231f38ee9a883be4a08475c67a