From fe6eb40c6af4ce0d90741625dfd173b277664704 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Tue, 26 Mar 2024 07:06:03 -0500 Subject: [PATCH] fix(cli): Do not display CFs with no trash IDs Fixes #229 --- CHANGELOG.md | 10 ++++++---- .../Pipelines/CustomFormat/CustomFormatDataLister.cs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47b6c2d9..02724afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,13 +18,15 @@ changes you may need to make. - **BREAKING**: The app data directory on OSX has changed. It now lives at `~/Library/Application Support/recyclarr` instead of `~/.config/recyclarr`. Users will need to run `recyclarr migrate` to move the directory (or do it manually). -- Slightly improved display of version number when using `-v` option. +- CLI: Slightly improved display of version number when using `-v` option. ### Fixed -- Print more useful diagnostics when there's a connectivity problem to a service (e.g. incorrect - `base_url`). -- Regression that prevented basic validation of `base_url` & `api_key`. +- YAML: Print more useful diagnostics when there's a connectivity problem to a service (e.g. + incorrect `base_url`). +- YAML: Regression that prevented basic validation of `base_url` & `api_key`. +- CLI: CFs with no Trash ID will no longer be displayed when running the `list custom-formats` + command. ## [6.0.2] - 2023-10-20 diff --git a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatDataLister.cs b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatDataLister.cs index 884e2393..cc5ee7fa 100644 --- a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatDataLister.cs +++ b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatDataLister.cs @@ -53,6 +53,7 @@ public class CustomFormatDataLister(IAnsiConsole console, ICustomFormatGuideServ } var categories = guide.GetCustomFormatData(serviceType) + .Where(x => !string.IsNullOrWhiteSpace(x.TrashId)) .OrderBy(x => x.Name) .ToLookup(x => x.Category) .OrderBy(x => x.Key);