Commit Graph

7 Commits

Author SHA1 Message Date
3621b66437 fix: handle MAL API returning numbers instead of strings for zero-value statistics
The MyAnimeList API inconsistently returns statistics status fields (watching,
completed, on_hold, dropped, plan_to_watch) as quoted strings for non-zero
values (e.g. "8217") but as bare numbers for zero values (e.g. 0). This caused
JSON unmarshal errors for anime with zero counts in any status field.

Introduce a FlexString custom type that implements json.Unmarshaler to accept
both JSON strings and JSON numbers, always storing the result as a string. The
type definition lives in MALTypes.go and the unmarshal logic in MALFunctions.go
to keep static types and behavior separate.
2026-05-27 17:28:54 -04:00
5ee9c42352 cleaned up errors in go code 2024-12-15 00:19:48 -05:00
77e361b5b2 rewrote the Anime.svelte to move out helper functions and clean up code 2024-09-05 15:29:42 -04:00
862c78d3b8 added MAL update status and submit loader 2024-08-16 18:15:56 -04:00
fb2d5fbdea added ability to get anime as needed from MAL 2024-08-16 15:07:06 -04:00
22ff290a81 added getting MAL watchlist 2024-08-15 21:27:31 -04:00
fa3304db92 added MAL Login 2024-08-13 18:54:27 -04:00