/
PluginConfiguration.cs
58 lines (52 loc) · 1.71 KB
/
PluginConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.Tvdb.Configuration
{
/// <summary>
/// Configuration for tvdb.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>
/// Gets the tvdb api key for project.
/// </summary>
public const string ProjectApiKey = "7f7eed88-2530-4f84-8ee7-f154471b8f87";
private int _cacheDurationInHours = 1;
private int _cacheDurationInDays = 7;
private int _metadataUpdateInHours = 2;
/// <summary>
/// Gets or sets the tvdb api key for user.
/// </summary>
/// <remarks>
/// This is the subscriber's pin.
/// </remarks>
public string SubscriberPIN { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the cache in hours.
/// </summary>
public int CacheDurationInHours
{
get => _cacheDurationInHours;
set => _cacheDurationInHours = value < 1 ? 1 : value;
}
/// <summary>
/// Gets or sets the cache in days.
/// </summary>
public int CacheDurationInDays
{
get => _cacheDurationInDays;
set => _cacheDurationInDays = value < 1 ? 7 : value;
}
/// <summary>
/// Gets or sets the metadata update in hours.
/// </summary>
public int MetadataUpdateInHours
{
get => _metadataUpdateInHours;
set => _metadataUpdateInHours = value < 1 ? 1 : value;
}
/// <summary>
/// Gets or sets the fallback languages.
/// </summary>
public string FallbackLanguages { get; set; } = string.Empty;
}
}