caching for "files" and images + moved search result types
This commit is contained in:
parent
5a66f61a4c
commit
7668ee5eca
7 changed files with 253 additions and 124 deletions
19
video.go
19
video.go
|
@ -32,18 +32,6 @@ var (
|
|||
mu sync.Mutex
|
||||
)
|
||||
|
||||
// VideoResult reflects the structured data for a video result
|
||||
type VideoResult struct {
|
||||
Href string
|
||||
Title string
|
||||
Date string
|
||||
Views string
|
||||
Creator string
|
||||
Publisher string
|
||||
Image string
|
||||
Duration string
|
||||
}
|
||||
|
||||
// VideoAPIResponse matches the structure of the JSON response from the Piped API
|
||||
type VideoAPIResponse struct {
|
||||
Items []struct {
|
||||
|
@ -99,11 +87,8 @@ func checkDisabledInstancesPeriodically() {
|
|||
ticker := time.NewTicker(retryDuration)
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
checkAndReactivateInstances()
|
||||
}
|
||||
for range ticker.C {
|
||||
checkAndReactivateInstances()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue