Skip to content

Commit

Permalink
Merge pull request #122 from scampower3/naming-fixes
Browse files Browse the repository at this point in the history
Fixes some poorly named variables and label "for" tag fixes
  • Loading branch information
Shadowghost authored Mar 11, 2024
2 parents 308b6b0 + 27e7e56 commit e5f3d4d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class PluginConfiguration : BasePluginConfiguration
/// <remarks>
/// This is the subscriber's pin.
/// </remarks>
public string ApiKey { get; set; } = string.Empty;
public string SubscriberPIN { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the cache in hours.
Expand Down
14 changes: 7 additions & 7 deletions Jellyfin.Plugin.Tvdb/Configuration/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ <h2 class="sectionTitle">TheTVDB Settings:</h2>
href="https://github.com/jellyfin/jellyfin-plugin-tvdb">${Help}</a>
</div>
<div class="inputContainer">
<label for="txtTvdbApiKey">TheTvdb API Key:</label>
<input type="text" id="txtTvdbApiKey" is="emby-input" />
<label for="txtTvdbSubscriberPIN">TheTvdb Subscriber PIN:</label>
<input type="text" id="txtTvdbSubscriberPIN" is="emby-input" />
<div class="fieldDescription">
Optional. TheTVDB Api Key from Subscriptions.
Optional. TheTVDB Subscriber PIN from Subscriptions.
</div>
</div>
<div class="inputContainer">
<label for="txtTvdbApiKey">Cache time in hours:</label>
<label for="cacheDurationInHours">Cache time in hours:</label>
<input type="number" id="cacheDurationInHours" required="required" is="emby-input" />
<div class="fieldDescription">
The cache time in hours for metadata.
</div>
</div>
<div class="inputContainer">
<label for="txtTvdbApiKey">Cache time in days:</label>
<label for="cacheDurationInDays">Cache time in days:</label>
<input type="number" id="cacheDurationInDays" required="required" is="emby-input" />
<div class="fieldDescription">
The cache time in days for Languages and Activity Type metadata.
Expand All @@ -53,7 +53,7 @@ <h2 class="sectionTitle">TheTVDB Settings:</h2>
Dashboard.showLoadingMsg();

ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) {
document.getElementById('txtTvdbApiKey').value = config.ApiKey || '';
document.getElementById('txtTvdbSubscriberPIN').value = config.SubscriberPIN || '';
document.getElementById('cacheDurationInHours').value = config.CacheDurationInHours;
document.getElementById('cacheDurationInDays').value = config.CacheDurationInDays;
Dashboard.hideLoadingMsg();
Expand All @@ -64,7 +64,7 @@ <h2 class="sectionTitle">TheTVDB Settings:</h2>
Dashboard.showLoadingMsg();

ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) {
config.ApiKey = document.getElementById('txtTvdbApiKey').value;
config.SubscriberPIN = document.getElementById('txtTvdbSubscriberPIN').value;
config.CacheDurationInHours = document.getElementById('cacheDurationInHours').value;
config.CacheDurationInDays = document.getElementById('cacheDurationInDays').value;
ApiClient.updatePluginConfiguration(TvdbPluginConfiguration.uniquePluginId, config).then(function (result) {
Expand Down
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.Tvdb/TvdbClientManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public TvdbClientManager(IApplicationHost applicationHost)
_tokenUpdatedAt = DateTime.MinValue;
}

private static string? UserPin => TvdbPlugin.Instance?.Configuration.ApiKey;
private static string? UserPin => TvdbPlugin.Instance?.Configuration.SubscriberPIN;

private static int CacheDurationInHours => TvdbPlugin.Instance?.Configuration.CacheDurationInHours ?? 1;

Expand Down

0 comments on commit e5f3d4d

Please sign in to comment.