This commit introduces worker pooling for handling media proxy requests,
allowing for actual concurrency in this area.
Key changes:
- Add ProxyJob struct to represent worker pool jobs
- Create a channel for ProxyJob and initialise workers in init function
- Modify ProxyRequest to use the worker pool
- Add proxyWorker and processProxyJob functions for job processing
The number of workers and job queue size are currently hardcoded but can
be made configurable in the future.
This commit introduces a significant refactoring of the ranking calendar
functionality. The main changes include:
1. Created a new `DayCalendar` struct to represent calendar data.
2. Modified `GetRankingCalendar` to return a slice of `DayCalendar`
instead of generating HTML directly.
3. Updated the template to use the new `DayCalendar` struct for rendering.
4. Moved HTML generation from Go code to the template.
This commit consolidates retrieving user artworks and novels into
a single function, GetUserWorks.
A new Work interface abstracts common behavior between artworks and novels.
The computeSliceBounds utility function is also moved to the end of the file.
This commit introduces worker pooling for handling media proxy requests,
allowing for actual concurrency in this area.
Key changes:
- Add ProxyJob struct to represent worker pool jobs
- Create a channel for ProxyJob and initialise workers in init function
- Modify ProxyRequest to use the worker pool
- Add proxyWorker and processProxyJob functions for job processing
The number of workers and job queue size are currently hardcoded but can
be made configurable in the future.
This commit introduces a mechanism for randomly selecting User-Agents
from a predefined list to be used for requests to the Pixiv API.
References to setting a custom User-Agent via the PIXIVFE_USERAGENT
environment variable have been removed as it is no longer used.