You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
984 B
34 lines
984 B
using CliFx.Infrastructure;
|
|
using JetBrains.Annotations;
|
|
using TrashLib.Radarr.CustomFormat.Guide;
|
|
|
|
namespace TrashLib.Radarr.CustomFormat;
|
|
|
|
[UsedImplicitly]
|
|
public class CustomFormatLister : ICustomFormatLister
|
|
{
|
|
private readonly IConsole _console;
|
|
private readonly IRadarrGuideService _guide;
|
|
|
|
public CustomFormatLister(IConsole console, IRadarrGuideService guide)
|
|
{
|
|
_console = console;
|
|
_guide = guide;
|
|
}
|
|
|
|
public void ListCustomFormats()
|
|
{
|
|
_console.Output.WriteLine("\nList of Custom Formats in the TRaSH Guides:\n");
|
|
|
|
var profilesFromGuide = _guide.GetCustomFormatData();
|
|
foreach (var profile in profilesFromGuide)
|
|
{
|
|
_console.Output.WriteLine($" - {profile.TrashId} # {profile.Name}");
|
|
}
|
|
|
|
_console.Output.WriteLine(
|
|
"\nThe above Custom Formats are in YAML format and ready to be copied & pasted " +
|
|
"under the `trash_ids:` property.");
|
|
}
|
|
}
|