]> git.lizzy.rs Git - go-anidb.git/log
go-anidb.git
21 months agoModernize master
Elias Fleckenstein [Tue, 19 Jul 2022 21:22:46 +0000 (23:22 +0200)]
Modernize

9 years agoAdd LICENSE file via addalicense.com
Diogo Franco [Tue, 12 Aug 2014 05:08:04 +0000 (14:08 +0900)]
Add LICENSE file via addalicense.com

10 years agohttp: Recognize more Resource types
Diogo Franco (Kovensky) [Wed, 9 Oct 2013 00:07:55 +0000 (21:07 -0300)]
http: Recognize more Resource types

10 years agoanidb: Remove unused imports, fixes compilation
Diogo Franco (Kovensky) [Sat, 27 Jul 2013 15:46:18 +0000 (12:46 -0300)]
anidb: Remove unused imports, fixes compilation

10 years agoanidb: Implement MYLISTSTATS
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 23:34:09 +0000 (20:34 -0300)]
anidb: Implement MYLISTSTATS

10 years agoanidb: allow (*udpWrap).SendRecv to be called with nil parameters
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 23:32:45 +0000 (20:32 -0300)]
anidb: allow (*udpWrap).SendRecv to be called with nil parameters

10 years agoanidb: Add AnimeCount() call
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 23:32:13 +0000 (20:32 -0300)]
anidb: Add AnimeCount() call

10 years agoanidb: Also cache the EID-AID relationship when caching FILE results
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 23:31:50 +0000 (20:31 -0300)]
anidb: Also cache the EID-AID relationship when caching FILE results

10 years agoanidb: Make (*AniDB).User() try harder to return a user
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 23:29:44 +0000 (20:29 -0300)]
anidb: Make (*AniDB).User() try harder to return a user

Will block for at least 2 seconds if the user ID is not cached. Any UDP
API access will cache the user ID.

10 years agoanidb: rename misc.go to globals.go
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 17:37:57 +0000 (14:37 -0300)]
anidb: rename misc.go to globals.go

10 years agoanidb: Correct cache key for LID.MyListEntry
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 15:45:32 +0000 (12:45 -0300)]
anidb: Correct cache key for LID.MyListEntry

Caused lookups to always miss cache.

10 years agoanidb: Correct syntax error
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 15:25:13 +0000 (12:25 -0300)]
anidb: Correct syntax error

10 years agomylistadd: Only add if the file isn't on mylist yet
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 15:23:28 +0000 (12:23 -0300)]
mylistadd: Only add if the file isn't on mylist yet

Edit the file state to MyListStateHDD otherwise.

10 years agoanidb: Add a few more linking methods
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 15:21:04 +0000 (12:21 -0300)]
anidb: Add a few more linking methods

10 years agoanidb: Avoid crash during MyListAdd / MyListEdit
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 15:20:43 +0000 (12:20 -0300)]
anidb: Avoid crash during MyListAdd / MyListEdit

Could happen if a file is added without a cached MyListEntry. Make a fake
MyListEntry and cache that, with an old enough Cached timestamp to make
it always stale.

Also change the always stale timestamp in parseMylistReply to a more
reliably ancient one.

10 years agomylistadd: Say on stdout that you're waiting on the API
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 14:00:54 +0000 (11:00 -0300)]
mylistadd: Say on stdout that you're waiting on the API

The lack of protocol spam due to the new default logger makes the program
weirdly pause at the end.

10 years agoanidb: Allow setting the Logger to use for logging traffic
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 13:59:48 +0000 (10:59 -0300)]
anidb: Allow setting the Logger to use for logging traffic

By default, log to ioutil.Discard (logging to nil would result in a crash).

The udpWrap now needs to keep a reference to *AniDB in order to use the
Logger. UpdateTitles also had to be changed to be an *AniDB* method because
of the Logger.

10 years agoanidb: Correct inverted test in FileByEd2kSize
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 05:32:38 +0000 (02:32 -0300)]
anidb: Correct inverted test in FileByEd2kSize

Resulted in always having cache misses.

10 years agomylistadd: Add a simple mylist adder as an example program
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 05:22:40 +0000 (02:22 -0300)]
mylistadd: Add a simple mylist adder as an example program

There's no guarantee that the API is stable yet.

10 years agoanidb: Make ReAuth try to use the cache before sending USER query
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 05:16:28 +0000 (02:16 -0300)]
anidb: Make ReAuth try to use the cache before sending USER query

10 years agoanidb: Correct the regexp used to verify ed2k hashes
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 05:14:10 +0000 (02:14 -0300)]
anidb: Correct the regexp used to verify ed2k hashes

The POSIX character class isn't treated as a character class unless inside
an extra set of brackets.

10 years agoanidb: Add new mylist entry as Unknown if MyListSet doesn't say anything
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 04:33:48 +0000 (01:33 -0300)]
anidb: Add new mylist entry as Unknown if MyListSet doesn't say anything

10 years agoanidb: Fix crash when MyListAdd/MyListEdit get a nil MyListSet
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 04:28:49 +0000 (01:28 -0300)]
anidb: Fix crash when MyListAdd/MyListEdit get a nil MyListSet

It's meant to be nillable.

10 years agoanidb: Implement MyListAdd / MyListEdit / MyListDel
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 04:20:54 +0000 (01:20 -0300)]
anidb: Implement MyListAdd / MyListEdit / MyListDel

Untested and undocumented.

10 years agoanidb: Update the MyListAnime when running a mylist file query
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 02:48:43 +0000 (23:48 -0300)]
anidb: Update the MyListAnime when running a mylist file query

Keeps the MyListAnime's cached timestamp as it was before the update, since
this is updating a non-up-to-date view of MyListAnime.

10 years agoanidb: Use a map instead of various fields that have to be switched
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 02:39:52 +0000 (23:39 -0300)]
anidb: Use a map instead of various fields that have to be switched

Yet another map for which we have to write a MarshalJSON method...

10 years agoanidb: Try to get (*AniDB).User() from the cache if it's unset
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 01:54:40 +0000 (22:54 -0300)]
anidb: Try to get (*AniDB).User() from the cache if it's unset

10 years agoanidb: Automatically run USER query after AUTH
Diogo Franco (Kovensky) [Fri, 26 Jul 2013 01:42:41 +0000 (22:42 -0300)]
anidb: Automatically run USER query after AUTH

This also lets us have a convenient adb.User() that returns the current
user; this only works though if we're already authenticated.

10 years agoanidb: Support querying for mylist of an Anime
Diogo Franco (Kovensky) [Thu, 25 Jul 2013 22:22:59 +0000 (19:22 -0300)]
anidb: Support querying for mylist of an Anime

It's not very informative due to AniDB-side restrictions.

10 years agomisc: Implement json.Marshaler/Unmarshaler in EpisodeList
Diogo Franco (Kovensky) [Thu, 25 Jul 2013 22:21:50 +0000 (19:21 -0300)]
misc: Implement json.Marshaler/Unmarshaler in EpisodeList

Makes for nicer JSON dumps with anidb-like lists instead of unnecessarily
exposing all the internals.

10 years agomisc: Add (*EpisodeRange).Len()
Diogo Franco (Kovensky) [Thu, 25 Jul 2013 21:17:48 +0000 (18:17 -0300)]
misc: Add (*EpisodeRange).Len()

Use Valid() to check for validity on EpisodeRanges. Remove an unhelpful
panic.

10 years agoanidb: Add EpisodeString field to File
Diogo Franco (Kovensky) [Thu, 25 Jul 2013 21:14:33 +0000 (18:14 -0300)]
anidb: Add EpisodeString field to File

Pre-formats and pre-processes the EpisodeNumber.

10 years agoanidb: Add shortcut cache querying functions
Diogo Franco (Kovensky) [Thu, 25 Jul 2013 21:12:12 +0000 (18:12 -0300)]
anidb: Add shortcut cache querying functions

For instance (*File).Anime() instead of (*File).AID.Anime().

10 years agoanidb: Implement MYLIST for single files
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 21:04:59 +0000 (18:04 -0300)]
anidb: Implement MYLIST for single files

10 years agoanidb: Parse the LID from FILE response
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 21:04:18 +0000 (18:04 -0300)]
anidb: Parse the LID from FILE response

Each file has a different LID (or none) depending on the currently logged
in user. LID are globally unique.

10 years agoanidb: Implement USER
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:58:06 +0000 (17:58 -0300)]
anidb: Implement USER

10 years agomisc: Make String() and Format() not pointer methods
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:56:42 +0000 (17:56 -0300)]
misc: Make String() and Format() not pointer methods

10 years agomisc: (*EpisodeList).Sub: allow subtracting arbitrary containers
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:55:47 +0000 (17:55 -0300)]
misc: (*EpisodeList).Sub: allow subtracting arbitrary containers

10 years agomisc: Make the iterator part of EpisodeContainer interface
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:55:16 +0000 (17:55 -0300)]
misc: Make the iterator part of EpisodeContainer interface

Also adds iterators to Episode (returns a single copy of itself) and to
EpisodeList (returns the contents of the iterators of each sublist in
sequence).

10 years agomisc: Add an iterator to EpisodeRange
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:54:10 +0000 (17:54 -0300)]
misc: Add an iterator to EpisodeRange

10 years agomisc: Rename (Episode).(Inc|Dec) to (Episode).(IncPart|DecPart)
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 20:53:31 +0000 (17:53 -0300)]
misc: Rename (Episode).(Inc|Dec) to (Episode).(IncPart|DecPart)

10 years agomisc: Allow adding/removing arbitrary episodes to an EpisodeList
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 17:57:56 +0000 (14:57 -0300)]
misc: Allow adding/removing arbitrary episodes to an EpisodeList

10 years agomisc: Be more cautious when merging partial ranges
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 17:56:13 +0000 (14:56 -0300)]
misc: Be more cautious when merging partial ranges

Change the touch() method to not accept touches where the left side is a
partial episode with unknown number of parts. If the number of parts is
known, then only accept if it's the last part.

10 years agomisc: (*EpisodeRange).Split(*Episode) -- Splits a range
Diogo Franco (Kovensky) [Wed, 17 Jul 2013 17:26:02 +0000 (14:26 -0300)]
misc: (*EpisodeRange).Split(*Episode) -- Splits a range

Also define Inc/IncNumber/Dec/DecNumber for episodes, used internally by
Split. Includes test.

10 years agoConvert cache system to github.com/Kovensky/go-fscache
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 22:47:39 +0000 (19:47 -0300)]
Convert cache system to github.com/Kovensky/go-fscache

Includes wrapper methods that keep the Cached timestamp more-or-less
synchronized with the cache. Internally assert that the objects that
are supposed to have embedded timestamps implement the right interface.

Changes intent map to use interface{}, as there's no reason for the
intents to have to be cacheable.

10 years agoanidb: Update documentation / comments
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:06:32 +0000 (14:06 -0300)]
anidb: Update documentation / comments

10 years agomisc: CountEpisodes and convenience conversion functions
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:06:13 +0000 (14:06 -0300)]
misc: CountEpisodes and convenience conversion functions

10 years agomisc: Always simplify EpisodeLists
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:05:42 +0000 (14:05 -0300)]
misc: Always simplify EpisodeLists

10 years agoanidb: Cache finished anime for longer
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:05:13 +0000 (14:05 -0300)]
anidb: Cache finished anime for longer

Once they've finished airing, it's more unlikely they'll get updates. We
only consider they as finished if they were cached more than one
AnimeCacheDuration after the end though.

10 years agoanidb: Change retry timer factors
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:03:32 +0000 (14:03 -0300)]
anidb: Change retry timer factors

Now gives a progression of 10s, 20s, 40s and 60s waits.

10 years agoanidb: Remove unused struct errorReply
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:02:50 +0000 (14:02 -0300)]
anidb: Remove unused struct errorReply

10 years agoanidb: Delete params s and tag from retries
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:02:35 +0000 (14:02 -0300)]
anidb: Delete params s and tag from retries

These get added by (*udpapi.AniDBUDP).SendRecv(); we don't want to show
them in the log.

10 years agoanidb: Handle UDP API 601 (server down)
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:01:34 +0000 (14:01 -0300)]
anidb: Handle UDP API 601 (server down)

We treat it the same as a ban: wait 30 minutes before allowing any
packets through.

10 years agoanidb: Handle invalid AID HTTP API response
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:00:26 +0000 (14:00 -0300)]
anidb: Handle invalid AID HTTP API response

10 years agoanidb: Support files with partial/multiple episodes
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 17:00:02 +0000 (14:00 -0300)]
anidb: Support files with partial/multiple episodes

Correct the parsing of OtherEpisodes, rename to RelatedEpisodes. Remove
old debug logging.

10 years agoanidb: Support FilesByGroup/FilesByGID
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:57:49 +0000 (13:57 -0300)]
anidb: Support FilesByGroup/FilesByGID

Takes an Episode, for its recorded AID and episode number data.
Also includes helper method FIDsByGID.

10 years agomisc: Support partial episodes
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:52:51 +0000 (13:52 -0300)]
misc: Support partial episodes

10 years agoanidb: Simplify (*AniDB).EpisodeByID()
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:50:18 +0000 (13:50 -0300)]
anidb: Simplify (*AniDB).EpisodeByID()

Use (*Anime).EpisodeByEID() to search for the requested episode.

10 years agoanidb: Log HTTP API traffic
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:48:23 +0000 (13:48 -0300)]
anidb: Log HTTP API traffic

10 years agoanidb: Log UDP traffic
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:46:40 +0000 (13:46 -0300)]
anidb: Log UDP traffic

But only the first line of replies. ReAuth and Logout need special
handling since they don't use the sendQueue.

10 years agoudp, anidb: Lock shared data, return APIReply for authentication
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:43:45 +0000 (13:43 -0300)]
udp, anidb: Lock shared data, return APIReply for authentication

Makes error reporting easier.

10 years agomisc: Add FormatLog method to Episode/EpisodeList/EpisodeRange
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:34:16 +0000 (13:34 -0300)]
misc: Add FormatLog method to Episode/EpisodeList/EpisodeRange

EpisodeList.FormatLog takes an EpisodeCount instead of an int; and each
subrange is formatted according to the log of the count for its own
type.

10 years agoanidb: Refactor the intent map
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:25:51 +0000 (13:25 -0300)]
anidb: Refactor the intent map

Allows notifications without closing the channels. All current users of
Notify were changed to NotifyClose.

10 years agoanidb: Add logging to titlecache, be more careful with caching
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:20:22 +0000 (13:20 -0300)]
anidb: Add logging to titlecache, be more careful with caching

Only cache the new anime-titles.dat.gz (thus truncating an older one) if
we can download it entirely to memory (it's little less than 600KB).

10 years agoanidb: (*Anime).Episode(): be more helpful in the panic message
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:18:19 +0000 (13:18 -0300)]
anidb: (*Anime).Episode(): be more helpful in the panic message

10 years agoanidb: Remove debug logging from cache
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:17:28 +0000 (13:17 -0300)]
anidb: Remove debug logging from cache

10 years agoanidb: Immediately return error for clearly invalid IDs
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:16:54 +0000 (13:16 -0300)]
anidb: Immediately return error for clearly invalid IDs

10 years agoanidb: Move EpisodeCount struct to misc
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 16:02:26 +0000 (13:02 -0300)]
anidb: Move EpisodeCount struct to misc

10 years agoanidb: Add (*Anime).EpisodeByEID
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 15:58:52 +0000 (12:58 -0300)]
anidb: Add (*Anime).EpisodeByEID

Also remove redundant type Episodes []*Episode -- the Episodes type
didn't have any methods.

10 years agohttp, udp: Remove debug logging
Diogo Franco (Kovensky) [Tue, 16 Jul 2013 15:39:12 +0000 (12:39 -0300)]
http, udp: Remove debug logging

Keep complaints about unknown resource types though, but mention that it
comes from the HTTP API.

10 years agoanidb: rename ed2kCache to fidCache
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 15:41:55 +0000 (12:41 -0300)]
anidb: rename ed2kCache to fidCache

10 years agomisc: Fix Episode<->Episode comparison
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 15:41:07 +0000 (12:41 -0300)]
misc: Fix Episode<->Episode comparison

10 years agoanidb: Change Episodes to be []*Episode
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 13:40:03 +0000 (10:40 -0300)]
anidb: Change Episodes to be []*Episode

10 years agoanidb: Add missing loop 'break's to EpisodeByEID
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:26:58 +0000 (01:26 -0300)]
anidb: Add missing loop 'break's to EpisodeByEID

Without the breaks, it's would be possible to query for an Anime
with AID 0, a clear waste of time.

Also move the 'ok = false' assignment closer to where it's documented.

10 years agoanidb: Always remove credentials on Logout()
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:25:55 +0000 (01:25 -0300)]
anidb: Always remove credentials on Logout()

Even if they were never used.

10 years agoanidb: Document that credentials are needed for UDP queries
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:25:32 +0000 (01:25 -0300)]
anidb: Document that credentials are needed for UDP queries

Commit messages aren't documentation :(

10 years agoanidb: Document which backend API is used on the Get* methods
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:21:38 +0000 (01:21 -0300)]
anidb: Document which backend API is used on the Get* methods

Queries that depend on the UDP API can't be used without SetCredentials.

10 years agoanidb: Fix compilation
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:11:53 +0000 (01:11 -0300)]
anidb: Fix compilation

10 years agoanidb: Check the HTTP API error as well for deleting invalid Anime
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:09:51 +0000 (01:09 -0300)]
anidb: Check the HTTP API error as well for deleting invalid Anime

10 years agoanidb: Delete invalid cache data
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:07:27 +0000 (01:07 -0300)]
anidb: Delete invalid cache data

If the API queries return errors specifically stating that requested
object doesn't exist, then delete the entry from the local cache.

10 years agoanidb: Return the previously available data if API refresh failed
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:06:01 +0000 (01:06 -0300)]
anidb: Return the previously available data if API refresh failed

Makes the GetObjectByKey family of methods behave better if the API
is somehow unavailable.

10 years agoanidb: Simplify documentation
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 04:03:41 +0000 (01:03 -0300)]
anidb: Simplify documentation

10 years agoanidb: Wait longer after each UDP API timeout
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 03:27:04 +0000 (00:27 -0300)]
anidb: Wait longer after each UDP API timeout

Reset the wait after the first successful read.

10 years agoanidb: Implement GroupByName
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 03:26:29 +0000 (00:26 -0300)]
anidb: Implement GroupByName

Also add the invalid key guard to GroupByID.

10 years agoanidb: fix ed2k caching
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 03:22:20 +0000 (00:22 -0300)]
anidb: fix ed2k caching

Don't embed time.Time in the cache struct -- time.Time has its own
GobEncode and GobDecode methods, and we don't want them to be used.

10 years agoanidb: Fix cache_test.go compilation
Diogo Franco (Kovensky) [Mon, 15 Jul 2013 03:21:54 +0000 (00:21 -0300)]
anidb: Fix cache_test.go compilation

10 years agoanidb: Remove commented out code
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 05:07:29 +0000 (02:07 -0300)]
anidb: Remove commented out code

10 years agoanidb: (*cacheDir).Get(): reduce the time a file lock is retained
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 05:04:35 +0000 (02:04 -0300)]
anidb: (*cacheDir).Get(): reduce the time a file lock is retained

When reading from cache, read the entire file into a buffer before
attempting to decode; release the lock as soon as the read is done.

Also move the parameter sanity check to be earlier in the method.

10 years agoanidb: Fix compilation of flock_other
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 04:54:46 +0000 (01:54 -0300)]
anidb: Fix compilation of flock_other

Also fixes inverted if test.

10 years agoanidb: Don't use a nil fileLock
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 04:54:16 +0000 (01:54 -0300)]
anidb: Don't use a nil fileLock

10 years agoanidb: Update documentation
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 15:42:42 +0000 (12:42 -0300)]
anidb: Update documentation

10 years agoanidb: panic if the default cache dir can't be set
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 15:41:29 +0000 (12:41 -0300)]
anidb: panic if the default cache dir can't be set

Nothing works without a valid cache.

10 years agoanidb: Correct accidental docstring
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 15:40:53 +0000 (12:40 -0300)]
anidb: Correct accidental docstring

10 years agoanidb: Support searching for multiple Episodes in an Anime
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 23:20:41 +0000 (20:20 -0300)]
anidb: Support searching for multiple Episodes in an Anime

10 years agoanidb: Don't send UDP queries if we have no credentials
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 23:19:51 +0000 (20:19 -0300)]
anidb: Don't send UDP queries if we have no credentials

We'd just get a 501 error and wouldn't be able to do anything about it.
Skip the middleman and return the 501 right away.

10 years agoanidb: New caching mechanism
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 23:16:42 +0000 (20:16 -0300)]
anidb: New caching mechanism

Refactors the various parts of the code that interacted with the cache
to use the new cache. Moves the intent system to be decoupled from the
cache.

Caches requests made with invalid keys, avoids requerying the API for
InvalidKeyCacheDuration (1 hour).

Untested on !windows, since that uses a separate file locking mechanism.

10 years agoanidb: Make cached *File expire earlier if they're Incomplete
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 18:03:46 +0000 (15:03 -0300)]
anidb: Make cached *File expire earlier if they're Incomplete

10 years agoanime: Make cached Anime expire earlier if they're Incomplete
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 18:01:38 +0000 (15:01 -0300)]
anime: Make cached Anime expire earlier if they're Incomplete

10 years agoanime: Consistently name the *AniDB "adb" in *AniDB methods
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 17:58:00 +0000 (14:58 -0300)]
anime: Consistently name the *AniDB "adb" in *AniDB methods

Makes the docs look better.

10 years agoanidb: Remove (*AniDB).ReAuth() method
Diogo Franco (Kovensky) [Sun, 14 Jul 2013 17:55:31 +0000 (14:55 -0300)]
anidb: Remove (*AniDB).ReAuth() method