Parse the year of a timetable #21

Merged
Seil0 merged 1 commits from :feature/parse-year into master 2021-10-24 15:00:13 +02:00
Collaborator

This adds the property year to the meta object returned in the timetable response.

Calculating the year of a course manually based on the current date and time is error prone as hell. Parsing should be a lot more error resistant. Although they're displaying a wrong year right now for the 52nd week... but it doesn't really matter around that time since there are no courses afaik.

This adds the property `year` to the meta object returned in the `timetable` response. Calculating the year of a course manually based on the current date and time is error prone as hell. Parsing should be a lot more error resistant. Although they're displaying a wrong year right now for the 52nd week... but it doesn't really matter around that time since there are no courses afaik.
hannesbraun added 12 commits 2021-10-23 23:46:11 +02:00
c62f576ace
Timetable fixes
- Only one request is made to get the timetable HTML document for parsing the timetable and the weekNumberYear
- On timeouts or other errors, the cached data won't be overwritten with emptiness anymore
- The scheduled updates will now also update the weekNumberYear
97efbd0877
Dependency updates
This also replaces JCenter with Maven Central since JCenter is now read-only
6f4cb9fd66
Small improvements
- Improve formatting
- Fix some typos
- Mini code improvements
e7b5eff04b
Use ConcurrentHashMap for timetableList
Multiple requests may be processed at the same time and could otherwise cause problems (concurrent write operations)
235cc7f773
Limit sending timetable requests in parallel to 3
Otherwise, the requests may fail (from my experience). Also we don't want to look suspicious (flooding their server with tons of requests at the same time).
continuous-integration/woodpecker the build was successful Details
24d0d9ac8c
TimetableParser: parse year
This also adds the parsed year to the meta object included in the timetable response
hannesbraun changed title from feature/parse-year to Parse the year of a timetable 2021-10-23 23:46:22 +02:00
hannesbraun requested review from Seil0 2021-10-23 23:46:34 +02:00
hannesbraun added the
enhancement
api
labels 2021-10-23 23:47:15 +02:00
hannesbraun added spent time 2021-10-23 23:47:46 +02:00
20min
hannesbraun force-pushed feature/parse-year from 24d0d9ac8c to d863f4fb1e 2021-10-24 14:39:33 +02:00 Compare
Seil0 approved these changes 2021-10-24 15:00:00 +02:00
Seil0 left a comment
Owner

lgtm

lgtm
Seil0 merged commit 940a30e9aa into master 2021-10-24 15:00:13 +02:00
Sign in to join this conversation.
No description provided.