You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Only try to import if the asset exists in the data store
80
+
if(existsInDataStore&&asset==null)
81
+
{
82
+
logger.LogInfo(BunkumCategory.UserContent,$"Referenced asset '{filename}' exists in data store but not in database, attempting to import automatically...");
logger.LogError(BunkumCategory.UserContent,$"Failed to read '{filename}' from data store!");
90
+
logger.LogDebug(BunkumCategory.UserContent,$"Failed to get '{filename}' after {sw.ElapsedMilliseconds}ms.");
91
+
returnnew(InternalServerError,null,$"Failed to read {assetTypeStr} internally. Please report this to the server owner.",onNewAssetRefCallback,existsInDataStore:existsInDataStore);
logger.LogDebug(BunkumCategory.UserContent,$"Failed to get '{filename}' after {sw.ElapsedMilliseconds}ms.");
99
+
returnnew(BadRequest,null,$"The used {assetTypeStr} was invalid or corrupt.",onNewAssetRefCallback,existsInDataStore:existsInDataStore);
100
+
}
101
+
102
+
sw.Stop();
103
+
logger.LogInfo(BunkumCategory.UserContent,$"Successfully imported '{filename}' in {sw.ElapsedMilliseconds}ms.");
104
+
}
105
+
106
+
// FIXME: for some reason, PSP texture detection/conversion broke so we can no longer tell if a PSP texture is actually a texture, so skip this for PSP
returnnew(BadRequest,null,$"The used {assetTypeStr} was not a valid custom image.",onNewAssetRefCallback,assetInfo:asset,existsInDataStore:existsInDataStore);
113
+
114
+
// TODO: actually use AIPI to scan image if not null
0 commit comments