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