Skip to content

Commit

Permalink
Add Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
scampower3 committed Aug 10, 2024
1 parent 8a245d3 commit 68aa539
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
12 changes: 9 additions & 3 deletions Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ public int CacheDurationInDays
public bool ImportSeasonName { get; set; } = false;

/// <summary>
/// Gets or sets a value indicating whether to include missing specials.
/// Gets or sets a value indicating whether to fallback to original language.
/// </summary>
public bool FallbackToOriginalLanguage { get; set; } = false;

/// <summary>
/// Gets or sets a value indicating whether to include missing specials for Missing Episode Provider.
/// </summary>
public bool IncludeMissingSpecials { get; set; } = true;

/// <summary>
/// Gets or sets a value indicating whether to fallback to original language.
/// Gets or sets a value indicating whether to remove all missing episodes on refresh for Missing Episode Provider.
/// </summary>
public bool FallbackToOriginalLanguage { get; set; } = false;
public bool RemoveAllMissingEpisodesOnRefresh { get; set; } = false;

/// <summary>
/// Gets or sets the metadata update in hours for the Check for Metadata Updates Scheduled Task.
Expand Down Expand Up @@ -89,5 +94,6 @@ public int MetadataUpdateInHours
/// Gets or sets a value indicating whether to update movie for the Check for Metadata Updates Scheduled Task.
/// </summary>
public bool UpdateMovieScheduledTask { get; set; } = false;

}

Check failure on line 98 in Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

View workflow job for this annotation

GitHub Actions / call / build

Check failure on line 98 in Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

View workflow job for this annotation

GitHub Actions / call / test

Check failure on line 98 in Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

View workflow job for this annotation

GitHub Actions / call / test

Check failure on line 98 in Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

View workflow job for this annotation

GitHub Actions / call / Analyze (csharp)

Check failure on line 98 in Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

View workflow job for this annotation

GitHub Actions / call / Analyze (csharp)

}
23 changes: 16 additions & 7 deletions Jellyfin.Plugin.Tvdb/Configuration/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,22 @@ <h2 class="sectionTitle">TheTVDB Settings:</h2>
</div>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="importSeasonName" />
<span>Import season name from provider.</span>
<span>Import season name from provider</span>
</label>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="fallbackToOriginalLanguage" />
<span>Fallback to Original Language (Last resort if other fallback languages fails)</span>
</label>
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">Missing Episode Provider Settings:</h2>
</div>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="includeMissingSpecials" />
<span>Include missing specials</span>
</label>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="fallbackToOriginalLanguage" />
<span>Fallback to Original Language (Last resort if other fallback languages fails)</span>
<input is="emby-checkbox" type="checkbox" id="removeAllMissingEpisodesOnRefresh" />
<span>Remove All Missing Episodes On Refresh</span>
</label>
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">Check for Metadata Updates Scheduled Task Settings:</h2>
Expand Down Expand Up @@ -102,9 +109,10 @@ <h2 class="sectionTitle">Check for Metadata Updates Scheduled Task Settings:</h2
document.getElementById('cacheDurationInDays').value = config.CacheDurationInDays;
document.getElementById('fallbackLanguages').value = config.FallbackLanguages;
document.getElementById('importSeasonName').checked = config.ImportSeasonName
document.getElementById('includeMissingSpecials').checked = config.IncludeMissingSpecials;
document.getElementById('fallbackToOriginalLanguage').checked = config.FallbackToOriginalLanguage;

// Missing Episode Provider Settings
document.getElementById('includeMissingSpecials').checked = config.IncludeMissingSpecials;
document.getElementById('removeAllMissingEpisodesOnRefresh').checked = config.RemoveAllMissingEpisodesOnRefresh;
// Check for Metadata Updates Scheduled Task Settings
document.getElementById('metadataUpdateInHours').value = config.MetadataUpdateInHours;
document.getElementById('updateSeriesScheduledTask').checked = config.UpdateSeriesScheduledTask;
Expand All @@ -124,9 +132,10 @@ <h2 class="sectionTitle">Check for Metadata Updates Scheduled Task Settings:</h2
config.CacheDurationInDays = document.getElementById('cacheDurationInDays').value;
config.FallbackLanguages = document.getElementById('fallbackLanguages').value;
config.ImportSeasonName = document.getElementById('importSeasonName').checked;
config.IncludeMissingSpecials = document.getElementById('includeMissingSpecials').checked;
config.FallbackToOriginalLanguage = document.getElementById('fallbackToOriginalLanguage').checked;

// Missing Episode Provider Settings
config.IncludeMissingSpecials = document.getElementById('includeMissingSpecials').checked;
config.RemoveAllMissingEpisodesOnRefresh = document.getElementById('removeAllMissingEpisodesOnRefresh').checked;
//Check for Metadata Updates Scheduled Task Settings
config.MetadataUpdateInHours = document.getElementById('metadataUpdateInHours').value;
config.UpdateSeriesScheduledTask = document.getElementById('updateSeriesScheduledTask').checked;
Expand Down

0 comments on commit 68aa539

Please sign in to comment.