Added work remaining url for remote extraction client
This commit is contained in:
@@ -62,10 +62,7 @@ public sealed class TruthDataService : ITruthDataService
|
||||
return null;
|
||||
}
|
||||
|
||||
var suffix = Plugin.Instance?.Configuration.TruthFileSuffix ?? ".jray.json";
|
||||
var truthPath = Path.Combine(
|
||||
Path.GetDirectoryName(item.Path) ?? string.Empty,
|
||||
Path.GetFileNameWithoutExtension(item.Path) + suffix);
|
||||
var truthPath = GetSidecarPath(item.Path);
|
||||
|
||||
if (!File.Exists(truthPath))
|
||||
{
|
||||
@@ -95,5 +92,19 @@ public sealed class TruthDataService : ITruthDataService
|
||||
_cache.TryRemove(itemId, out _);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasTruth(Guid itemId, string itemPath)
|
||||
{
|
||||
return _managedTruthStore.Exists(itemId) || File.Exists(GetSidecarPath(itemPath));
|
||||
}
|
||||
|
||||
private static string GetSidecarPath(string itemPath)
|
||||
{
|
||||
var suffix = Plugin.Instance?.Configuration.TruthFileSuffix ?? ".jray.json";
|
||||
return Path.Combine(
|
||||
Path.GetDirectoryName(itemPath) ?? string.Empty,
|
||||
Path.GetFileNameWithoutExtension(itemPath) + suffix);
|
||||
}
|
||||
|
||||
private sealed record CacheEntry(TruthFile? Truth, DateTime LoadedAt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user