cleanup IgnoreListSeason after switching to ids (#307)

This commit is contained in:
Kilian von Pflugk 2024-09-23 18:47:43 +02:00 committed by GitHub
parent ed7e26d63e
commit 133808eb35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -1023,7 +1023,7 @@
// show the ignore list editor. // show the ignore list editor.
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
const IgnoreList = await getJson("Intros/IgnoreList/" + encodeURI(selectShow.value)); const IgnoreList = await getJson("Intros/IgnoreListSeries/" + encodeURI(selectShow.value));
ignorelistIntro.checked = IgnoreList.IgnoreIntro; ignorelistIntro.checked = IgnoreList.IgnoreIntro;
ignorelistCredits.checked = IgnoreList.IgnoreCredits; ignorelistCredits.checked = IgnoreList.IgnoreCredits;
ignorelistSection.style.display = "unset"; ignorelistSection.style.display = "unset";
@ -1041,11 +1041,10 @@
// season changed, reload all episodes // season changed, reload all episodes
async function seasonChanged() { async function seasonChanged() {
const seasonData = encodeURI(selectShow.value) + "/" + encodeURI(selectSeason.value); const seasonData = encodeURI(selectShow.value) + "/" + encodeURI(selectSeason.value);
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
// show the ignore list editor. // show the ignore list editor.
saveIgnoreListSeasonButton.style.display = "block"; saveIgnoreListSeasonButton.style.display = "block";
const IgnoreList = await getJson("Intros/IgnoreList/" + seasonData); const IgnoreList = await getJson("Intros/IgnoreListSeason/" + encodeURI(selectSeason.value));
ignorelistIntro.checked = IgnoreList.IgnoreIntro; ignorelistIntro.checked = IgnoreList.IgnoreIntro;
ignorelistCredits.checked = IgnoreList.IgnoreCredits; ignorelistCredits.checked = IgnoreList.IgnoreCredits;
IgnoreListSeasonId = IgnoreList.SeasonId; IgnoreListSeasonId = IgnoreList.SeasonId;

View File

@ -76,11 +76,10 @@ public class VisualizationController(ILogger<VisualizationController> logger) :
/// <summary> /// <summary>
/// Returns the ignore list for the provided season. /// Returns the ignore list for the provided season.
/// </summary> /// </summary>
/// <param name="seriesId">Show ID.</param>
/// <param name="seasonId">Season ID.</param> /// <param name="seasonId">Season ID.</param>
/// <returns>List of episode titles.</returns> /// <returns>List of episode titles.</returns>
[HttpGet("IgnoreList/{SeriesId}/{SeasonId}")] [HttpGet("IgnoreListSeason/{SeasonId}")]
public ActionResult<IgnoreListItem> GetIgnoreListSeason([FromRoute] Guid seriesId, [FromRoute] Guid seasonId) public ActionResult<IgnoreListItem> GetIgnoreListSeason([FromRoute] Guid seasonId)
{ {
if (!Plugin.Instance!.QueuedMediaItems.ContainsKey(seasonId)) if (!Plugin.Instance!.QueuedMediaItems.ContainsKey(seasonId))
{ {
@ -100,7 +99,7 @@ public class VisualizationController(ILogger<VisualizationController> logger) :
/// </summary> /// </summary>
/// <param name="seriesId">Show ID.</param> /// <param name="seriesId">Show ID.</param>
/// <returns>List of episode titles.</returns> /// <returns>List of episode titles.</returns>
[HttpGet("IgnoreList/{SeriesId}")] [HttpGet("IgnoreListSeries/{SeriesId}")]
public ActionResult<IgnoreListItem> GetIgnoreListSeries([FromRoute] Guid seriesId) public ActionResult<IgnoreListItem> GetIgnoreListSeries([FromRoute] Guid seriesId)
{ {
var seasonIds = Plugin.Instance!.QueuedMediaItems var seasonIds = Plugin.Instance!.QueuedMediaItems