Skip to content

Commit

Permalink
Add better logging for anime updates
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Jan 24, 2019
1 parent 7e9bafb commit 3fb81fa
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -130,17 +130,19 @@ public virtual enHelperActivityType Process()
if (CacheOnly || !ForceFromAniDB)
{
//logger.Info("Trying to load Anime HTTP info from cache file...");
logger.Info("Not forced update. This may be because it was updated recently. Trying to load " + AnimeID + " anime data from cache.");
docAnime = APIUtils.LoadAnimeHTTPFromFile(animeID);


if (docAnime == null && !CacheOnly)
{
//logger.Info("No Anime HTTP info found in cache file, loading from HTTP API");
logger.Info("No Anime HTTP info found in cache file for " + animeID +", loading from HTTP API");
docAnime = AniDBHTTPHelper.GetAnimeXMLFromAPI(animeID);
}
}
else if (!CacheOnly)
{
logger.Info("Forced update. Trying to load " + AnimeID + " anime data from AniDB API.");
docAnime = AniDBHTTPHelper.GetAnimeXMLFromAPI(animeID);

if (docAnime == null)
Expand All @@ -152,6 +154,7 @@ public virtual enHelperActivityType Process()

if (docAnime != null)
{
logger.Info("Anime data loaded for " + AnimeID + ". Processing and saving it.");
anime = AniDBHTTPHelper.ProcessAnimeDetails(docAnime, animeID);
if (anime == null) return enHelperActivityType.NoSuchAnime;

Expand Down

0 comments on commit 3fb81fa

Please sign in to comment.