WIP - Bug hunting
This commit is contained in:
@@ -67,11 +67,9 @@ namespace gaseous_server.Classes.Metadata
|
||||
throw new Exception("How did you get here?");
|
||||
}
|
||||
|
||||
// check for presence of "original" quality file - download if absent or force download is true
|
||||
string localFile = Path.Combine(ImagePath, Communications.IGDBAPI_ImageSize.original.ToString(), returnValue.ImageId + ".jpg");
|
||||
if (GetImages == true)
|
||||
{
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
if (forceImageDownload == true)
|
||||
{
|
||||
Logging.Log(Logging.LogType.Information, "Metadata: " + returnValue.GetType().Name, "Artwork download forced.");
|
||||
|
||||
|
@@ -70,8 +70,8 @@ namespace gaseous_server.Classes.Metadata
|
||||
|
||||
case HasheousClient.Models.MetadataModel.MetadataSources.Hasheous:
|
||||
// set rate limiter avoidance values
|
||||
RateLimitAvoidanceWait = 250;
|
||||
RateLimitAvoidanceThreshold = 10;
|
||||
RateLimitAvoidanceWait = 1500;
|
||||
RateLimitAvoidanceThreshold = 6;
|
||||
RateLimitAvoidancePeriod = 1;
|
||||
|
||||
// set rate limiter recovery values
|
||||
@@ -1059,7 +1059,7 @@ namespace gaseous_server.Classes.Metadata
|
||||
}
|
||||
if (!Directory.Exists(Path.GetDirectoryName(requestedPath)))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(originalPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(requestedPath));
|
||||
}
|
||||
|
||||
// get the resolution attribute for enum size
|
||||
|
@@ -69,9 +69,7 @@ namespace gaseous_server.Classes.Metadata
|
||||
throw new Exception("How did you get here?");
|
||||
}
|
||||
|
||||
// check for presence of "original" quality file - download if absent or force download is true
|
||||
string localFile = Path.Combine(ImagePath, Communications.IGDBAPI_ImageSize.original.ToString(), returnValue.ImageId + ".jpg");
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
if (forceImageDownload == true)
|
||||
{
|
||||
Logging.Log(Logging.LogType.Information, "Metadata: " + returnValue.GetType().Name, "Company logo download forced.");
|
||||
|
||||
|
@@ -69,29 +69,14 @@ namespace gaseous_server.Classes.Metadata
|
||||
throw new Exception("How did you get here?");
|
||||
}
|
||||
|
||||
string localFile = Path.Combine(ImagePath, Communications.IGDBAPI_ImageSize.original.ToString(), returnValue.ImageId + ".jpg");
|
||||
if (GetImages == true)
|
||||
{
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
if (forceImageDownload == true)
|
||||
{
|
||||
Logging.Log(Logging.LogType.Information, "Metadata: " + returnValue.GetType().Name, "Cover download forced.");
|
||||
|
||||
// check for presence of image file - download if absent or force download is true
|
||||
List<Communications.IGDBAPI_ImageSize> imageSizes = new List<Communications.IGDBAPI_ImageSize>{
|
||||
Communications.IGDBAPI_ImageSize.cover_big,
|
||||
Communications.IGDBAPI_ImageSize.cover_small,
|
||||
Communications.IGDBAPI_ImageSize.original
|
||||
};
|
||||
|
||||
Communications comms = new Communications();
|
||||
foreach (Communications.IGDBAPI_ImageSize size in imageSizes)
|
||||
{
|
||||
localFile = Path.Combine(ImagePath, size.ToString(), returnValue.ImageId + ".jpg");
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
{
|
||||
comms.GetSpecificImageFromServer(ImagePath, returnValue.ImageId, size, null);
|
||||
}
|
||||
}
|
||||
comms.GetSpecificImageFromServer(ImagePath, returnValue.ImageId, Communications.IGDBAPI_ImageSize.original, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -243,13 +243,13 @@ namespace gaseous_server.Classes.Metadata
|
||||
Collection GameCollection = Collections.GetCollections(Game.Collection.Id);
|
||||
}
|
||||
|
||||
if (Game.ExternalGames != null)
|
||||
{
|
||||
foreach (long ExternalGameId in Game.ExternalGames.Ids)
|
||||
{
|
||||
ExternalGame GameExternalGame = ExternalGames.GetExternalGames(ExternalGameId);
|
||||
}
|
||||
}
|
||||
// if (Game.ExternalGames != null)
|
||||
// {
|
||||
// foreach (long ExternalGameId in Game.ExternalGames.Ids)
|
||||
// {
|
||||
// ExternalGame GameExternalGame = ExternalGames.GetExternalGames(ExternalGameId);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (Game.Franchise != null)
|
||||
{
|
||||
|
@@ -71,9 +71,7 @@ namespace gaseous_server.Classes.Metadata
|
||||
|
||||
if (returnValue != null)
|
||||
{
|
||||
// check for presence of "original" quality file - download if absent or force download is true
|
||||
string localFile = Path.Combine(ImagePath, Communications.IGDBAPI_ImageSize.original.ToString(), returnValue.ImageId + ".jpg");
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
if (forceImageDownload == true)
|
||||
{
|
||||
Logging.Log(Logging.LogType.Information, "Metadata: " + returnValue.GetType().Name, "Platform logo download forced.");
|
||||
|
||||
|
@@ -67,11 +67,9 @@ namespace gaseous_server.Classes.Metadata
|
||||
throw new Exception("How did you get here?");
|
||||
}
|
||||
|
||||
// check for presence of "original" quality file - download if absent or force download is true
|
||||
string localFile = Path.Combine(ImagePath, Communications.IGDBAPI_ImageSize.original.ToString(), returnValue.ImageId + ".jpg");
|
||||
if (GetImages == true)
|
||||
{
|
||||
if ((!File.Exists(localFile)) || forceImageDownload == true)
|
||||
if (forceImageDownload == true)
|
||||
{
|
||||
Logging.Log(Logging.LogType.Information, "Metadata: " + returnValue.GetType().Name, "Screenshot download forced.");
|
||||
|
||||
|
Reference in New Issue
Block a user