Save and parse repository index when AddonManager loads
authorIngo Ruhnke <grumbel@gmail.com>
Tue, 26 Aug 2014 20:29:08 +0000 (22:29 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Tue, 26 Aug 2014 22:57:45 +0000 (00:57 +0200)
Meaning the user doesn't have to redownload it each time he starts the
game.

src/addon/addon_manager.cpp

index 934dc1d..e6c1b0a 100644 (file)
@@ -110,6 +110,15 @@ AddonManager::AddonManager(const std::string& addon_directory,
       }
     }
   }
+
+  try
+  {
+    m_repository_addons = parse_addon_infos("/addons/repository.nfo");
+  }
+  catch(const std::exception& err)
+  {
+    log_warning << "parsing repository.nfo failed: " << err.what() << std::endl;
+  }
 }
 
 AddonManager::~AddonManager()