Commit Graph

208 Commits

Author SHA1 Message Date
perennial 271517756f landing page overhaul 2024-10-10 23:42:52 +11:00
perennial 214fcbf9a7 simplify index backend logic 2024-10-10 23:13:29 +11:00
perennial 0cb9847d31 pixivision tag: display total number of articles 2024-10-10 20:52:50 +11:00
perennial 2192b1b378 inline comments for core/pixivision.go 2024-10-10 20:31:30 +11:00
perennial c7193e583d Revert "pixivision landing page attempt"
This reverts commit 15dd300aa60fe5535cfee7e9a152516f6a8e3d73.
2024-10-10 17:19:41 +11:00
perennial 80aaa72bf5 pixivision landing page attempt 2024-10-10 17:19:26 +11:00
perennial a252005b95 implement userNovels 2024-10-09 19:09:03 +11:00
perennial b0c2b63651 Fix rebase 2024-10-07 15:26:22 +11:00
perennial d6138ca7af Implement worker pool for proxy requests
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.
2024-10-05 21:16:22 +10:00
perennial 3ed93fa6bc link to artwork page instead on ranking calendar 2024-10-01 20:48:48 +10:00
perennial edb19880b1 Refactor ranking calendar to use structured data
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.
2024-10-01 20:28:53 +10:00
perennial 524cd0b6ac refine ranking calendar styling 2024-10-01 20:10:53 +10:00
perennial 2a5b2276c8 ranking calendar card draft 2024-10-01 19:47:02 +10:00
perennial 667d0513c8 ranking calendar: use cards 2024-10-01 19:36:34 +10:00
perennial 4ac909f1a7 add comments to rankingCalendar.go files 2024-10-01 19:12:36 +10:00
perennial 73dadd913f ranking calendar draft 2024-10-01 19:09:37 +10:00
iacore e27dc301e2 Add cookie: Locale 2024-10-08 22:55:13 +00:00
iacore 6d225d5959 Cleanup global i18n 2024-10-08 06:14:19 +00:00
perennial 435305af15 rm unused log import 2024-10-08 13:33:43 +11:00
perennial c60f1a8c40 'fix' spurious ranking page issues 2024-10-08 01:03:03 +11:00
perennial 9bdaefd706 Return nil rather than an error in computeSliceBounds 2024-10-08 00:40:02 +11:00
perennial ca5f041013 Revert "Use Work interface when retrieving user artworks and novels"
This reverts commit 27749085da.

Didn't check for other calls to GetUserArtworks
2024-10-08 00:03:12 +11:00
perennial 27749085da Use Work interface when retrieving user artworks and novels
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.
2024-10-07 23:46:54 +11:00
perennial b12b81455c Slicing safely in core/user.go
Prevents panic loop when accessing an invalid page on user route
2024-10-07 23:19:10 +11:00
iacore 4a0bcf2f58 Translate short strings 2024-10-07 05:05:47 +00:00
perennial 2c69a8c8d3 Improve error handling in retryRequest 2024-10-07 14:21:56 +11:00
jackyzy823 a014372f6f feat: display novel/manga series on user page 2024-10-07 00:20:09 +08:00
VnPower 317c1dac71 Merge pull request 'feat: implement manga series' (#120) from jackyzy823/PixivFE:manga-series into v2
Reviewed-on: https://codeberg.org/VnPower/PixivFE/pulls/120
2024-10-06 03:38:31 +00:00
iacore 845bbba3c7 remove proxy job queue 2024-10-05 15:53:47 +00:00
perennial 991fcea714 revert proxy server pooling 2024-10-06 01:50:19 +10:00
jackyzy823 6c2b7f7bf4 feat: series nav in artwork page 2024-10-05 23:33:17 +08:00
iacore d99c974745 use http client from utils 2024-10-05 15:32:10 +00:00
iacore bbec5f6496 cleanup 2024-10-05 15:22:14 +00:00
iacore 2f4e95d002 Capture error strings for i18n 2024-10-05 15:19:22 +00:00
jackyzy823 d912a78f3a feat: implement manga series 2024-10-05 22:59:45 +08:00
iacore 546f83df20 make regex constructions global 2024-10-05 14:58:32 +00:00
iacore 582bbc4a60 cleanup 2024-10-05 14:49:09 +00:00
iacore c70f3aaa8f cleanup 2024-10-05 14:25:00 +00:00
perennial 5ced43adbc Fix failing compilation + gofmt 2024-10-05 21:37:46 +10:00
perennial 9d79c9693b Implement worker pool for proxy requests
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.
2024-10-05 21:27:50 +10:00
VnPower bbf77baec3 Fix responses logging without any content 2024-10-02 19:31:59 +07:00
VnPower 684d18cf25 Fix App API base 2024-09-29 16:56:15 +07:00
iacore 5f8b659b49 use urlx.Parse 2024-09-28 23:12:00 +00:00
VnPower 08ffd72dc6 App API base for credentials 2024-09-28 19:23:49 +07:00
iacore 1868c7a539 clean up 2024-09-24 18:56:01 +00:00
iacore ee2f2ba104 Log response. Fix #116 2024-09-24 18:46:00 +00:00
VnPower 18d6874e89 Merge pull request 'Implement series navigation info in novel page' (#114) from jackyzy823/PixivFE:novel-nav into v2
Reviewed-on: https://codeberg.org/VnPower/PixivFE/pulls/114
2024-09-24 12:51:02 +00:00
jackyzy823 5a558a6b7d Implement series navigation info in novel page 2024-09-23 22:57:57 +08:00
perennial 79f5c99ae3 Actual token exhaustion error handling and messaging
Actually reset all tokens to initial state when exhausted in retryRequest and
provide a more informative error message.
2024-09-24 00:24:08 +10:00
perennial d1534682e2 Implement random User-Agent selection
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.
2024-09-23 22:30:26 +10:00