aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-09 16:29:13 +0530
committerBobby <[email protected]>2026-02-09 16:29:13 +0530
commitcd9184421327da59c00d0766452e6082055947f2 (patch)
tree98e618eb029e947d276d367e9b6d96aaa1865a57 /utils
parentf382cfae8f0fd2facc7115d1f82dd27ceb1a8258 (diff)
downloadmetachan-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')
-rw-r--r--utils/api/aniskip/aniskip.go2
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()