Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
378677acda |
@@ -16,14 +16,20 @@ public class PluginServiceRegistrator : IPluginServiceRegistrator
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||||
{
|
{
|
||||||
var dbPath = Path.Combine(
|
|
||||||
applicationHost.Resolve<IApplicationPaths>().PluginConfigurationsPath,
|
|
||||||
"RedditComments",
|
|
||||||
"reddit-comments.db");
|
|
||||||
|
|
||||||
serviceCollection.AddSingleton<RateLimiter>();
|
serviceCollection.AddSingleton<RateLimiter>();
|
||||||
serviceCollection.AddSingleton(sp => new RedditClient(sp.GetRequiredService<ILogger<RedditClient>>(), sp.GetRequiredService<RateLimiter>()));
|
serviceCollection.AddSingleton(sp => new RedditClient(sp.GetRequiredService<ILogger<RedditClient>>(), sp.GetRequiredService<RateLimiter>()));
|
||||||
serviceCollection.AddSingleton(sp => new CommentCache(dbPath, sp.GetRequiredService<ILogger<CommentCache>>()));
|
|
||||||
|
// The path is resolved inside the factory (not eagerly here) because the host's service
|
||||||
|
// provider does not exist yet while RegisterServices is running.
|
||||||
|
serviceCollection.AddSingleton(sp =>
|
||||||
|
{
|
||||||
|
var dbPath = Path.Combine(
|
||||||
|
sp.GetRequiredService<IApplicationPaths>().PluginConfigurationsPath,
|
||||||
|
"RedditComments",
|
||||||
|
"reddit-comments.db");
|
||||||
|
return new CommentCache(dbPath, sp.GetRequiredService<ILogger<CommentCache>>());
|
||||||
|
});
|
||||||
|
|
||||||
serviceCollection.AddSingleton(sp => new RedditCommentsService(
|
serviceCollection.AddSingleton(sp => new RedditCommentsService(
|
||||||
sp.GetRequiredService<ILogger<RedditCommentsService>>(),
|
sp.GetRequiredService<ILogger<RedditCommentsService>>(),
|
||||||
sp.GetRequiredService<RedditClient>(),
|
sp.GetRequiredService<RedditClient>(),
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"version": "1.0.0.0",
|
"version": "1.0.0.0",
|
||||||
"changelog": "- Initial release\n- Player OSD button + comments sidebar\n- Reddit thread search across configurable subreddits\n- SQLite caching with separate TTLs for found/not-found results\n- Sliding-window rate limiter (default 60 requests/minute, max 100)\n- Lazy loading: Reddit is only contacted on button click",
|
"changelog": "- Initial release\n- Player OSD button + comments sidebar\n- Reddit thread search across configurable subreddits\n- SQLite caching with separate TTLs for found/not-found results\n- Sliding-window rate limiter (default 60 requests/minute, max 100)\n- Lazy loading: Reddit is only contacted on button click",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.gabjimmy.com/Gabe/Jellyfin-Comments/releases/download/FixedV1/Jellyfin.Plugin.RedditComments_1.0.0.0.zip",
|
"sourceUrl": "https://git.gabjimmy.com/Gabe/Jellyfin-Comments/releases/download/1.0.1/Jellyfin.Plugin.RedditComments_1.0.0.0.zip",
|
||||||
"checksum": "83c0fe073263c25c119ef3421fe9dbfb",
|
"checksum": "e83846f799ae02b8af635bc026e8b4f0",
|
||||||
"timestamp": "2026-07-16T00:00:00Z"
|
"timestamp": "2026-07-16T00:00:00Z"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user