Refactor
This commit is contained in:
parent
46a3715bae
commit
7892657362
@ -34,7 +34,6 @@ var jobs = map[string]time.Duration{
|
||||
"twist": 2 * time.Hour,
|
||||
"search-index": 2 * time.Hour,
|
||||
"refresh-episodes": 10 * time.Hour,
|
||||
"refresh-track-titles": 10 * time.Hour,
|
||||
"refresh-osu": 12 * time.Hour,
|
||||
"sync-anime": 12 * time.Hour,
|
||||
"sync-shoboi": 24 * time.Hour,
|
||||
|
@ -24,14 +24,14 @@ func main() {
|
||||
}
|
||||
|
||||
func sync(track *arn.SoundTrack) {
|
||||
for _, media := range track.Media {
|
||||
media.RefreshMetaData()
|
||||
println(media.Service, media.Title)
|
||||
}
|
||||
// for _, media := range track.Media {
|
||||
// media.RefreshMetaData()
|
||||
// println(media.Service, media.Title)
|
||||
// }
|
||||
|
||||
err := track.Save()
|
||||
// err := track.Save()
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
}
|
||||
|
@ -37,23 +37,23 @@ func TestRoutes(t *testing.T) {
|
||||
func TestInterfaceImplementations(t *testing.T) {
|
||||
// API interfaces
|
||||
var creatable = reflect.TypeOf((*api.Creatable)(nil)).Elem()
|
||||
var updatable = reflect.TypeOf((*api.Updatable)(nil)).Elem()
|
||||
var editable = reflect.TypeOf((*api.Editable)(nil)).Elem()
|
||||
var actionable = reflect.TypeOf((*api.Actionable)(nil)).Elem()
|
||||
var collection = reflect.TypeOf((*api.Collection)(nil)).Elem()
|
||||
|
||||
// Required interface implementations
|
||||
var interfaceImplementations = map[string][]reflect.Type{
|
||||
"User": []reflect.Type{
|
||||
updatable,
|
||||
editable,
|
||||
},
|
||||
"Thread": []reflect.Type{
|
||||
creatable,
|
||||
updatable,
|
||||
editable,
|
||||
actionable,
|
||||
},
|
||||
"Post": []reflect.Type{
|
||||
creatable,
|
||||
updatable,
|
||||
editable,
|
||||
actionable,
|
||||
},
|
||||
"SoundTrack": []reflect.Type{
|
||||
|
Loading…
Reference in New Issue
Block a user