Make thing beeing able to be modified
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"path"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@@ -35,6 +36,8 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
|
||||
}
|
||||
defer closeOrPanic(resp.Body, "GET:https://"+URL)
|
||||
|
||||
log.Printf("Fetched %s", URL)
|
||||
|
||||
doc, err := goquery.NewDocumentFromReader(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
2
main.go
2
main.go
@@ -78,7 +78,7 @@ func newAppData(opts Options) (*appData, error) {
|
||||
|
||||
res.db = OpenAlbumDatabase(filepath.Join(basepath, "db"))
|
||||
res.getter = &AlbumDescriptionGetter{
|
||||
getter: NewRateLimitedGetter(10, 10*time.Second),
|
||||
getter: NewRateLimitedGetter(opts.MaxRequests, opts.RequestWindow),
|
||||
}
|
||||
|
||||
res.cover = NewAlbumCoverCache(filepath.Join(basepath, "covers"), opts.MaxRequests, opts.RequestWindow)
|
||||
|
||||
Reference in New Issue
Block a user