diff options
| author | Bobby <[email protected]> | 2026-02-09 16:29:13 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-09 16:29:13 +0530 |
| commit | cd9184421327da59c00d0766452e6082055947f2 (patch) | |
| tree | 98e618eb029e947d276d367e9b6d96aaa1865a57 /utils/api | |
| parent | f382cfae8f0fd2facc7115d1f82dd27ceb1a8258 (diff) | |
| download | metachan-cd9184421327da59c00d0766452e6082055947f2.tar.xz metachan-cd9184421327da59c00d0766452e6082055947f2.zip | |
Refactor AnimeUpdate worker logging and enhance API request for skip times
- Updated worker logging in AnimeUpdate to display worker ID starting from 1 instead of 0.
- Modified the API request in GetSkipTimesForEpisode to include episodeLength=0 in the query parameters for better handling of skip times.
- Added a new BaseModel struct in entities package to standardize model definitions with hidden ID and timestamp fields for JSON responses.
Diffstat (limited to 'utils/api')
| -rw-r--r-- | utils/api/aniskip/aniskip.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/api/aniskip/aniskip.go b/utils/api/aniskip/aniskip.go index eda78f0..d7cc343 100644 --- a/utils/api/aniskip/aniskip.go +++ b/utils/api/aniskip/aniskip.go @@ -126,7 +126,7 @@ func (c *client) makeRequest(ctx context.Context, url string) ([]byte, error) { } func GetSkipTimesForEpisode(malID, episodeNumber int) ([]types.AniskipResult, error) { - url := fmt.Sprintf("%s/skip-times/%d/%d?types=op&types=ed", aniskipBaseURL, malID, episodeNumber) + url := fmt.Sprintf("%s/skip-times/%d/%d?types=op&types=ed&episodeLength=0", aniskipBaseURL, malID, episodeNumber) ctx, cancel := context.WithTimeout(context.Background(), contextTimeout) defer cancel() |
