]> git.lizzy.rs Git - go-anidb.git/blobdiff - filecache.go
Modernize
[go-anidb.git] / filecache.go
index e590a73d7bc529ba07272a2afeb1f2c7c74ac872..ef9fe09298f9059e3fa1e25a1f67685657363bef 100644 (file)
@@ -2,11 +2,10 @@ package anidb
 
 import (
        "fmt"
-       "github.com/Kovensky/go-anidb/misc"
-       "github.com/Kovensky/go-anidb/udp"
-       "github.com/Kovensky/go-fscache"
+       "github.com/EliasFleckenstein03/go-anidb/misc"
+       "github.com/EliasFleckenstein03/go-anidb/udp"
+       "github.com/EliasFleckenstein03/go-fscache"
        "image"
-       "log"
        "regexp"
        "sort"
        "strconv"
@@ -31,6 +30,7 @@ func (f *File) IsStale() bool {
 }
 
 func cacheFile(f *File) {
+       CacheSet(f.AID, "aid", "by-eid", f.EID)
        CacheSet(f.FID, "fid", "by-ed2k", f.Ed2kHash, f.Filesize)
        CacheSet(f, "fid", f.FID)
 }
@@ -300,7 +300,7 @@ func (adb *AniDB) parseFileResponse(f **File, reply udpapi.APIReply, calledFromF
                        if partial {
                                if calledFromFIDsByGID {
                                        epno = test
-                                       log.Printf("UDP!!! FID %d is only part of episode %s with no complementary files", fid, epno)
+                                       adb.Logger.Printf("UDP!!! FID %d is only part of episode %s with no complementary files", fid, epno)
                                } else if len(test) == 1 && test[0].Start.Number == test[0].End.Number {
                                        fids := []int{}