init
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
using MediaBrowser.Model.Plugins;
|
||||
|
||||
namespace Jellyfin.Plugin.RedditComments.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Plugin configuration.
|
||||
/// </summary>
|
||||
public class PluginConfiguration : BasePluginConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PluginConfiguration"/> class.
|
||||
/// </summary>
|
||||
public PluginConfiguration()
|
||||
{
|
||||
RedditClientId = string.Empty;
|
||||
RedditClientSecret = string.Empty;
|
||||
RedditUserAgent = "linux:jellyfin-plugin-reddit-comments:v1.0.0 (by /u/unknown)";
|
||||
Subreddits = "anime";
|
||||
CacheDays = 30;
|
||||
NotFoundCacheHours = 24;
|
||||
MaxRequestsPerMinute = 60;
|
||||
MaxComments = 150;
|
||||
CommentDepth = 8;
|
||||
MinScore = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Reddit app client id (create a "script" app at https://www.reddit.com/prefs/apps).
|
||||
/// </summary>
|
||||
public string RedditClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Reddit app client secret.
|
||||
/// </summary>
|
||||
public string RedditClientSecret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the User-Agent sent to Reddit. Reddit requires a unique, descriptive value.
|
||||
/// </summary>
|
||||
public string RedditUserAgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the comma-separated list of subreddits to search, in order (without the r/ prefix).
|
||||
/// </summary>
|
||||
public string Subreddits { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how many days a found thread is cached before it is fetched again.
|
||||
/// </summary>
|
||||
public int CacheDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how many hours a "no thread found" result is cached.
|
||||
/// </summary>
|
||||
public int NotFoundCacheHours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of Reddit API requests per minute (Reddit's own limit is 100).
|
||||
/// </summary>
|
||||
public int MaxRequestsPerMinute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of comments requested from Reddit per thread.
|
||||
/// </summary>
|
||||
public int MaxComments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum reply depth requested from Reddit.
|
||||
/// </summary>
|
||||
public int CommentDepth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum score a comment must have to be shown.
|
||||
/// </summary>
|
||||
public int MinScore { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user