Robert Dailey
a8aaca42cc
feat: Support `*.yaml` extension
2 years ago
Robert Dailey
4f0e365dd5
test: Remove a few Refresh() calls no longer needed
...
Some Refresh calls happen automatically now for IFileInfo, etc. in
MockFileSystem.
2 years ago
Robert Dailey
2e1c7bff7d
build: Upgrade all nuget packages
2 years ago
Robert Dailey
9dbd0e56fa
build: Upgrade all nuget packages
2 years ago
Robert Dailey
6d90e8f293
chore: Remove attached folder from Rider project
2 years ago
Robert Dailey
deb6696622
refactor: Reorganize processor classes into subdirs
2 years ago
Robert Dailey
cdf4b27686
fix: Explicitly add System.Private.Uri package to resolve security issue
...
Resolves:
- CVE-2019-0981
- CVE-2019-0980
- CVE-2019-0657
2 years ago
Robert Dailey
cab505591f
chore: Remove unused code
2 years ago
Robert Dailey
8d2f582b38
refactor: Move all test projects under src/tests
...
This allows easier specification of test-specific msbuild properties
2 years ago
Robert Dailey
3823b0ec43
feat: Move config templates to new repository
2 years ago
Robert Dailey
7edcd77f98
fix: Use correct link in settings.yml template
2 years ago
Robert Dailey
3127ab3bb8
refactor: Delete auto-created temp dir in MockFileSystem
...
Needed because of this issue:
https://github.com/TestableIO/System.IO.Abstractions/issues/983
2 years ago
Robert Dailey
2c7f220a71
refactor: Add LeafDirectories() extension method for MockFileSystem
2 years ago
Robert Dailey
f1f9887042
refactor: Introduce config template repo settings
2 years ago
Robert Dailey
da35eef1ed
feat!: Restructure repository settings
2 years ago
Robert Dailey
b8ac93a464
refactor: Fix broken URLs
2 years ago
Robert Dailey
058c06504b
build: Upgrade nuget packages
2 years ago
Robert Dailey
96a278b06f
refactor: Make InstanceName non-nullable
2 years ago
Robert Dailey
fe9f98e435
refactor: Make exception class serializable
2 years ago
Robert Dailey
5609853321
feat!: Remove old migration steps
...
The following migration steps were removed:
- `MigrateTrashUpdaterAppDataDir`
- `MigrateTrashYml`
2 years ago
Robert Dailey
21a63ab8e1
feat!: replace_existing_custom_formats now defaults to true
2 years ago
Robert Dailey
c773a1a90b
refactor: Output log for each pipeline execution
2 years ago
Robert Dailey
3840f9c5ab
refactor: Improved error messaging for backward breaking config changes
2 years ago
Robert Dailey
cd6eda4055
feat!: Remove `reset_unmatched_scores` under quality score config
2 years ago
Robert Dailey
982de8806f
refactor: Remove V2 from some filenames
2 years ago
Robert Dailey
4a021a341b
feat!: Remove deprecated CLI commands
2 years ago
Robert Dailey
3e2ce37701
refactor: Delete unused source file
2 years ago
Robert Dailey
38e7980dbe
test: Fix or remove disabled tests
2 years ago
Robert Dailey
32ce3bde21
refactor: Fix serializable issue with CacheException
2 years ago
Robert Dailey
3c5b139523
refactor: Reduce cognitive complexity of method
2 years ago
Robert Dailey
134477ab46
refactor: Add timeouts to all regular expressions
2 years ago
Robert Dailey
286f4b95b1
refactor: Deprecation messages for old style array mapping
2 years ago
Robert Dailey
76040df597
refactor: Reorganize code and fix unit tests
2 years ago
Robert Dailey
6a16bd6045
refactor: Create interface for RuntimeValidationService
2 years ago
Robert Dailey
9a515aa820
build: Exclude config data project from dupe detection
2 years ago
Robert Dailey
5c98949edc
refactor: YAML configuration relies less on custom parsing code
...
This change was necessary to facilitate the ability to serialize
(create/modify) YAML configuration data. This is a prerequisite to
creating config templates and also GUI work in the future.
2 years ago
Robert Dailey
81bbc50ef7
build: Upgrade all packages
2 years ago
Robert Dailey
2652a5c663
build: Move Jetbrains.Annotations to projects
2 years ago
Robert Dailey
53595fc6ce
build: Move Spectre console analyzer to project file
2 years ago
Robert Dailey
b006122921
build: Move GitVersion.Build to projects
2 years ago
Robert Dailey
abb16f29e7
chore: Add file scope for CS files
2 years ago
Robert Dailey
761a247860
feat: Send API key via header instead of query param
2 years ago
Robert Dailey
5fc4da0f52
build: Upgrade Autofac and TestableIO packages
2 years ago
Robert Dailey
fbb5141c25
build: Upgrade YamlDotNet
2 years ago
Robert Dailey
40ed9f366c
build: Upgrade all nuget packages
2 years ago
Robert Dailey
29ca61f68f
refactor: Address several resharper analysis issues
2 years ago
Robert Dailey
39f106c72b
refactor: Fix warning related to FluentValidation & NRT
2 years ago
Robert Dailey
9d53fd0152
fix: Do not assume only one field element in CF specifications
...
For most CF specifications, there is only one element in the `fields`
array, which has a `value` property inside of each of its objects. One
particular specification, however, deviates from this assumption. The
"SizeSpecification" has been observed with *two* field objects.
Logic for parsing custom format CFs no longer assumes that the fields
property may only have one element in it.
Fixes #178
2 years ago
Robert Dailey
bebd28bc11
build: Upgrade FluentValidation
2 years ago
Robert Dailey
fc6a186809
build: Upgrade morelinq
2 years ago
Robert Dailey
93a8c8bc22
build: Upgrade all nuget packages
2 years ago
Robert Dailey
1a16432341
refactor: Remove inappropriate usage of `required` in CliSettings
2 years ago
Robert Dailey
f7bfab065d
fix: Show default value in `config list` help
2 years ago
Robert Dailey
dc93b10e64
test: Add await where necessary
2 years ago
Robert Dailey
e54cef0859
feat: `config list local` implemented
2 years ago
Robert Dailey
ce481e0d1f
refactor: Config loader no longer reuses state
2 years ago
Robert Dailey
f5386dfeda
fix: Template config listing is no longer reversed
2 years ago
Robert Dailey
f6f6ea3192
style: Solution-wide code cleanup
2 years ago
Robert Dailey
a3c172cf02
feat: Add config list templates command
...
Lists template YAML files in the trash repo.
2 years ago
Robert Dailey
902fbad4bf
chore: Remove unused run configuration
2 years ago
Robert Dailey
a934e68227
fix: Enable strict parsing to error on unknown CLI options
2 years ago
Robert Dailey
7c15c14f40
refactor: More concise usage of UsedImplicitly in SyncCommand
2 years ago
Robert Dailey
fe2b062ba7
fix: Consistently set FormatIDs to avoid incorrect logs
2 years ago
Robert Dailey
f298926353
fix: Use INF instead of DBG for score update log
2 years ago
Robert Dailey
58bbb94a44
build: Upgrade all nuget packages
2 years ago
Robert Dailey
a22d6dec33
fix: Log janitor updated to clean up logs in new 'cli' dir
2 years ago
Robert Dailey
e222f547cc
test: Fix config loader test
...
No exception is thrown when a non-empty config results in no usable
configuration.
2 years ago
Robert Dailey
c82894291f
fix: Do not fail on empty service type sections
2 years ago
Robert Dailey
bf9a08c19c
test: Fix broken unit test
2 years ago
Robert Dailey
cffb8d783a
refactor: Convert processors/updaters to pipelines
2 years ago
Robert Dailey
e3d6d4f79a
refactor: Remove DI for IServiceConfiguration in API services
2 years ago
Robert Dailey
bcc65857df
refactor: Split Sonarr/Radarr orthogonally into service-based classes
...
Instead of organizing logic using service, such as Sonarr or Radarr,
organize it using function. So now logic is broken up by Custom Format,
Release Profile, and Quality Size.
2 years ago
Robert Dailey
7dec45a07a
refactor: Eliminate generics for config type
2 years ago
Robert Dailey
289d661247
refactor: Silence warnings in _Layout.cshtml
2 years ago
Robert Dailey
c0bad938d7
feat: Split and restructure CLI logs
2 years ago
Robert Dailey
5adb966aa9
refactor: Add serilog to implicit usings
2 years ago
Robert Dailey
94b000c55f
build: Upgrade nuget packages for tests
2 years ago
Robert Dailey
adeb478777
fix: Exception when either Sonarr or Radarr configs are empty
2 years ago
Robert Dailey
7be4189378
refactor: Code cleanup
2 years ago
Robert Dailey
d66aa8ba44
refactor: Solution-wide code cleanup
2 years ago
Robert Dailey
86eca33eb3
refactor: Move Commands.Shared CS files up a level
...
This is to address a roslyn warning.
2 years ago
Robert Dailey
ce6afa4157
refactor: Fix more analysis issues
2 years ago
Robert Dailey
c226097cb5
refactor: Clone URL is now a Uri object
2 years ago
Robert Dailey
c45860d280
refactor: BaseUrl type is now Uri instead of string
2 years ago
Robert Dailey
7185cc5844
refactor: Fix various analysis issues
2 years ago
Robert Dailey
5d0db006ba
chore(style): Overhaul editorconfig
2 years ago
Robert Dailey
7bc5d407e3
build: Upgrade multiple nuget packages
2 years ago
Robert Dailey
4275336a8a
refactor: Fix unused member variable inspection issue
2 years ago
Robert Dailey
c05d73a84b
refactor: Remove redundant config validation
...
Validation already happens in ConfigParser, then SyncProcessor does not
need to do it as well.
2 years ago
Robert Dailey
8e22a5d561
test: Verify exceptional case for env var parsing
2 years ago
voltron4lyfe
aa523a0e14
feat: Enable referencing environment variables in config
...
Closes #145
Closes #154
2 years ago
Robert Dailey
6e397aefcf
test: Restructure tests
2 years ago
Robert Dailey
b9dc15f6a7
refactor: Relocate secrets yaml behavior to secrets dir
2 years ago
Robert Dailey
6fb1d4ad66
feat: Improved preview output for release profiles
2 years ago
Robert Dailey
964aeb8380
feat: Improved preview output for custom formats
2 years ago
Robert Dailey
fd3d76bc55
refactor: Rename Empty/NotEmpty extension methods
2 years ago
Robert Dailey
61c9dbcbf9
feat: Improved preview output for quality sizes
2 years ago
Robert Dailey
806a0fa64f
refactor: Do not use "empty" for SonarrCommand terms
2 years ago
Robert Dailey
7cdd94e626
fix: Use right deprecation message based on arguments
2 years ago
Robert Dailey
de3bf08543
fix: Update local repo before running commands that need it
2 years ago
Robert Dailey
7a008a6639
feat: CLI Revamp
...
Deprecate old commands: create-config, radarr, sonarr
New commands: config, sync, list
2 years ago
Robert Dailey
3ed9d4c814
chore: Update run configurations in Rider
2 years ago
Robert Dailey
64306db2dc
refactor: Add exception message enricher
...
Allows exception message without a stack trace to be written to the
console, while full exception details are still written to file sinks.
2 years ago
Robert Dailey
d73a888247
fix: Do not print skipped CFs to the console
...
They are too verbose
2 years ago
Robert Dailey
8c7768891e
fix: Better handling of invalid CF cache entries
...
Due to changes in v4.1.1, sometimes invalid cache entries (zero-value)
were written to the cache. These are now treated as invalid and matches
by name will be performed.
Fixes #160
2 years ago
Robert Dailey
18edb84133
test: Use default for argument matcher
2 years ago
Robert Dailey
28fa09f328
fix: Set CF IDs when no cache entry is present
...
Fixes #160
2 years ago
Robert Dailey
7ad4654d85
fix: Remove unredacted request URI from log files on exception
2 years ago
Robert Dailey
fd216c1b60
fix: Service URL is now part of cache directory name
2 years ago
Robert Dailey
5c3da551bb
fix: Detect and warn about conflicting CFs during sync
2 years ago
Robert Dailey
350fd21358
refactor: Overhaul config validation logic
...
- Validation of custom formats in Sonarr v4 is now performed
2 years ago
Robert Dailey
6997f4ca6a
chore: Rider run configuration updates
2 years ago
Robert Dailey
d5cbdb8648
chore: Move test projects to a solution folder
2 years ago
Robert Dailey
fea6575ae8
style: Code cleanup on entire solution
2 years ago
Robert Dailey
3b44964479
feat: Add clear separation between instance logs in console output
2 years ago
Robert Dailey
a4be018c44
feat: More detail output for CF sync changes
2 years ago
Robert Dailey
0830d1d6c8
feat: Re-introduce the CF name field in cache for display purposes
...
The CF name in cache is needed when printing information about deleted
CFs to console output.
2 years ago
Robert Dailey
8023f7f011
fix: Use comments for group headers in custom format listing
2 years ago
Robert Dailey
7358521a7a
fix: Sort CFs alphabetically in CLI listing
2 years ago
Robert Dailey
3f393d9894
chore: Updates to Rider run configurations
2 years ago
Robert Dailey
d71bce4990
fix: Do not perform actual logic when doing preview
...
Fixes #158
2 years ago
Robert Dailey
f7a7902c2c
build: Update several package dependencies
2 years ago
Robert Dailey
08d1ced7b6
refactor: Newline after message, but before exception details
2 years ago
Robert Dailey
b3666ec3cb
refactor: Less verbose error messages
2 years ago
Robert Dailey
eb9898fdd7
refactor: Implement Yaml Behavior system for extending parsing features
...
YamlSerializerFactory continues to grow as we add parsing features to
YAML files. A new behavior system now provides granular sets of features
to the factory. To extend the functionality of the YAML parser,
implement the `IYamlBehavior` interface. It will automatically be
registered to Autofac and injected into `YamlSerializerFactory`.
2 years ago
Robert Dailey
fc0daf631b
refactor: Address analysis issues
2 years ago
Robert Dailey
77603b6c93
refactor: Rename all projects to have Recyclarr prefix
2 years ago
Robert Dailey
bbb2195df2
feat!: Change Sonarr quality definitions config YAML to match Radarr
...
- Shares same syntax as Radarr
- Only Sonarr impacted
- Default behavior of `preferred_ratio` changed.
- Hybrid quality definition removed.
2 years ago
Robert Dailey
ab352f6a4c
fix: Do not warn about empty configs when they aren't really empty
...
This was caused by a logic error that thought that a file was empty just
because it didn't find any configuration data relevant to the current
subcommand. For example, a config file that only has Radarr config in it
when you run `recyclarr sonarr`.
2 years ago
Robert Dailey
ebb33f3328
refactor: Log git error message on clone retry
2 years ago
Robert Dailey
8a124d12f9
fix: Allow empty YAML files to be loaded
...
- Better contextual logging for YAML files
- When there's a syntax error in file parsing, skip that file.
- When validation fails for instance config, skip just that instance.
- If a file is empty, print a warning and skip it.
- Print instance name (instead of URL) in more places.
2 years ago
Robert Dailey
51d0219a1a
refactor: Move RegisterMockFor to extension method
2 years ago
Robert Dailey
c981a555ad
test: Use log context for existing tests
2 years ago
Robert Dailey
9acdf7da14
feat: Improved logging
...
- Handle exceptions better (also write them to serilog)
- Better redaction code
- Less verbose HTTP exception output
- Log more details about git cmd failures
2 years ago
Robert Dailey
94e55b6182
build: Nuget package upgrades
2 years ago
Robert Dailey
c1eb21d9ba
build: Remove System.Private.Uri (no longer used)
...
This was only added to address vulnerability scan, but this package is
no longer implicitly referenced.
2 years ago
Robert Dailey
69aec1450a
build: Move ManagePackageVersionsCentrally to Build.props
2 years ago
Robert Dailey
8d091ff471
build: Upgrade GUI-specific nuget packages
2 years ago
Robert Dailey
2e31dacea9
refactor: Code changes after System.IO.Abstractions upgrade
2 years ago
Robert Dailey
e47e1b2f82
build: Upgrade System.IO.Abstractions
2 years ago
Robert Dailey
f16008d225
refactor: Use better argument handling for git operations
...
Use array of args instead of string concatenations. Simplifies the logic
and also makes quoting args easier / more portable.
2 years ago
Robert Dailey
2b28fb9c73
chore: Update Rider run configurations for .NET 7
2 years ago
Robert Dailey
360f683718
chore: Remove another riderMarkupCache.xml file
2 years ago
Robert Dailey
d04b10f9d0
refactor: Utilize DI for Flurl
...
The goal is to eliminate the need for a "global setup" step for HTTP
communication. This can instead be done in the composition root as part
of the factory to request FlurlClient objects.
2 years ago
Robert Dailey
2a79a50d50
fix: Address multiple issues with the config template
...
- Simplify the comment style for YAML intended to be uncommented by the
user. Now they just need to delete the leading hash and YAML will be
at the appropriate indentation.
- Add additional explanation at the top about how to set up
configuration based on the guide.
- Fix link to the configuration reference.
2 years ago
Robert Dailey
53d7233b1e
build: Remove LangVersion from build props
...
Prefer to use the language version that is enabled by default based on
compatibility with selected target framework.
2 years ago
Robert Dailey
4a9f753423
chore: Delete and ignore riderMarkupCache.xml
...
This file continuously changes which indicates to me it should not be
versioned. This file must be new because there's no documentation
regarding it.
2 years ago
Robert Dailey
dfce05a9e8
build: Update Rider project files
2 years ago
Robert Dailey
969499bf5a
build: Fix for test packages not being assigned to TestLibrary.csproj
2 years ago
Robert Dailey
e5a0302c13
chore: Delete global.json (not needed)
2 years ago
Robert Dailey
6811c2c816
refactor: Do not create the RepoDirectory on start up
...
Let the GitRepositoryFactory do it.
2 years ago
Robert Dailey
794c8733ef
test: Fix CompositionRoot tests
...
Some types do not get registered until later on after
CompositionRoot.Setup() is called. Use IntegrationFixture to fulfill
mock versions of those types.
2 years ago
Robert Dailey
d83edd9e2b
refactor: Add logging to GitRepository / Factory
2 years ago
Robert Dailey
46067dffb0
test: Do not use NotThrow() in composition root test
...
Because Fluent.Assertions does not print the full exception details when
you use `Should().NotThrow()`. See issue:
https://github.com/fluentassertions/fluentassertions/issues/2015
2 years ago
Robert Dailey
b34798eabb
feat!: Remove LibGit2Sharp Library
...
This library was causing numerous issues related to git operations. The
straw that broke the camel's back is that it does not do automatic
garbage collection (`git gc --auto`). So a user's repo directory
continues to grow in size.
The replacement is CliWrap, which is just a simple wrapper library that
allows easy execution of shell commands. Specifically, `git` commands.
BREAKING CHANGE: This change now requires the `git` executable to be
installed by the user if run on a host system. The git executable will
be provided automatically for the docker image.
2 years ago
Robert Dailey
f810749b32
chore: Shared run configs updated for .NET 7.0 paths
2 years ago
Robert Dailey
7fdca11bc4
revert: "chore: Move GitVersion.yml into src dir"
...
This reverts commit 724d2c41aa
.
2 years ago
Robert Dailey
9fc7444f3c
refactor: Fix ASP.NET warning
...
[ASP0012] Suggest using builder.Services instead of ConfigureServices
2 years ago
Robert Dailey
dd8b518735
build: Upgrade all Nuget packages
2 years ago
Robert Dailey
b5a692a710
build: Upgrade to .NET 7.0
2 years ago
Robert Dailey
1d604b141b
feat: Named instances support
...
Use mapping-style instead of array-style for instances in configuration
YAML.
2 years ago
Robert Dailey
4ae54d8f54
fix: Restore compare by name for CFs
...
This is still needed if there already exist CFs in Radarr/Sonarr with
the same name.
2 years ago
Robert Dailey
7bfecdb3f3
build: Add nuget.config
2 years ago
Robert Dailey
3df3bc869e
refactor: Silence unused Version param warning
2 years ago
Robert Dailey
2ed8bdb55e
chore: Jetbrains Rider .idea files
2 years ago
Robert Dailey
e4a3e9d1fe
refactor: Remove unused Resolve method in IntegrationFixture
...
This method also had a bug in it: It leaked the child lifetime scope.
2 years ago
Robert Dailey
56666a245a
refactor: Do not fail on missing DTO properties
...
Previously, if Sonarr or Radarr added a new property to a DTO, Recyclarr
would fail when attempting to deserialize those responses. The purpose
of this was to catch compatibility issues early. However, this actually
prohibits a more useful case: Deserializing only data we care about and
having the freedom to ignore other, superfluous stuff.
2 years ago
Robert Dailey
081856e19e
refactor: Generalize compatibility check logic
...
Previously, only Sonarr had compatibility checking logic, which also
consequently meant that version information was obtained and logged for
Sonarr services. However, Radarr had no such checks because
compatibility has not yet been an issue. However, we still would like to
see version information printed when running Radarr instances.
2 years ago
Robert Dailey
934f30d71e
refactor: Print Recyclarr version to debug logs
2 years ago
Robert Dailey
724d2c41aa
chore: Move GitVersion.yml into src dir
2 years ago
voltron4lyfe
0dbc1ac7fd
feat: Support secrets in config ( #139 )
...
Fixes #105
2 years ago
Robert Dailey
e5750a97ba
refactor: Fix resharper analysis suggestions
2 years ago
Robert Dailey
a853f0830d
refactor: Separate config finding logic from ServiceCommand
...
Reason: Exception would be thrown when no config files are found when
invoking the various `--list` arguments. No configuration should not
prevent these from working.
2 years ago
Robert Dailey
f251bbeba4
feat: Support for loading configs in a directory
...
The `configs` directory may now be used to automatically load YAML
configuration files. Any YAML files in that directory are loaded without
using the `--config` option.
2 years ago
Robert Dailey
0b0fc1e7bc
refactor: Delete YamlDotNet ObjectFactory
...
This factory was incorrectly using an Autofac container to resolve
types. This led to symptoms like extra elements in arrays being
deserialized, due to those types being resolved by the DI container.
There's no real reason I can think of to depend on Autofac when
deserializing types from YAML. This object has been around since 1.0.0
and I do not remember why it was created.
2 years ago
Robert Dailey
835aae860b
refactor: Greatly simplify DI support code
...
- Get rid of `IServiceLocatorProxy`
- Get rid of `ICompositionRoot`
In addition, all unit tests avoid using `BaseCommand` directly, as it
does its own composition root setup and overrides the IntegrationFixture
test setup.
2 years ago
Robert Dailey
88bdc5a92e
refactor: Add JsonUtils class
2 years ago
Robert Dailey
dcfbccae2f
refactor: Use IServiceLocatorProxy instead of ILifetimeScope
...
In IntegrationFixture
2 years ago
Robert Dailey
cda317d3c3
fix: Run validation against Custom Formats in Sonarr
...
If custom formats are provided, run validation logic against them. This
also was an opportunity to make the ServiceConfiguration validation
logic reusable between Sonarr and Radarr.
2 years ago
voltron4lyfe
e1e3afff02
refactor: Rename QualityProfileConfig ( #135 )
2 years ago
Robert Dailey
ada30da70b
build: Upgrade Microsoft.NET.Test.Sdk (patch)
2 years ago
Robert Dailey
035bb0e17a
build: Upgrade MudBlazor (patch)
2 years ago
Robert Dailey
ebc46abd75
build: Upgrade Serilog Packages (minor)
2 years ago
Robert Dailey
2e45fbe1c5
build: Upgrade FluentValidation (patch)
2 years ago
Robert Dailey
9470377856
build: Upgrade AutoMapper (major)
2 years ago
Robert Dailey
32d7aa8a67
build: Upgrade YamlDotNet
2 years ago
Robert Dailey
4ab18fc9b0
build: Upgrade System.IO.Abstractions
2 years ago
Robert Dailey
8c936951c0
chore: Update DotSettings file
2 years ago
Robert Dailey
c775bc3c4d
refactor: Address Resharper inspection issues
2 years ago
Robert Dailey
3d403ef737
feat!: Do not load config next to executable
...
BREAKING CHANGE: The deprecated feature that still allowed you to keep
your `recyclarr.yml` next to the executable has been removed. Your
`recyclarr.yml` configuration file must now be located in your
application data directory
2 years ago
Robert Dailey
71580acc40
refactor: Service cache test fixes & improved testability
2 years ago
Robert Dailey
63c3bff27a
feat!: Remove names support for custom formats
...
BREAKING CHANGE: The `names` property is no longer supported under
`custom_formats:`. This feature was previously deprecated.
2 years ago
Robert Dailey
bdaada1049
refactor: Remove unnecessary Reset and factory semantics from steps
2 years ago
Robert Dailey
87747680ba
refactor: Fix unit tests and change DI resolution a bit
...
The introduction of lifetime scopes inside of configuration processing
in the Command classes introduced issues with the way resolution
overrides happened especially with integration test fixtures.
2 years ago
Robert Dailey
735c8562fc
chore: Fix path to .editorconfig in Recyclarr.sln
2 years ago
Robert Dailey
a9e5875bc5
chore: Move .editorconfig up a level and make intent rules consistent
2 years ago
Robert Dailey
3a21465ff1
fix: Fix incorrect version enforcement for Sonarr
...
When using multiple instances of Sonarr at v4 and v3, it was possible to
get a VersionException due to stale information carrying over between
processing instances.
2 years ago
Robert Dailey
361078ef86
refactor: Use better error message for Sonarr v3/v4 enforcement
2 years ago
Robert Dailey
1619bd8817
fix: Show a warning for duplicate scores
2 years ago
Robert Dailey
a63d570ec5
refactor: Change Log property to field
2 years ago
Robert Dailey
5f418a9d90
refactor: Namespace inconsistency
2 years ago
Robert Dailey
2e189ff275
fix(sonarr): Run version enforcement always
...
Version enforcement was only running if the user specified release
profiles because that logic was unintentionally tightly coupled to them.
Now that logic runs regardless of whether the user is using RPs or CFs.
2 years ago
Robert Dailey
ba84b07713
fix: Use compact JSON in debug logs
...
When logging HTTP response/request bodies during communication with
Radarr, Sonarr, etc, use a compact form instead. The previous form had
newlines in it which ended up making the logs vertically very long and
hard to follow.
2 years ago
Robert Dailey
87843b4ee1
chore: Code cleanup
2 years ago
Robert Dailey
7a25f79fa8
feat: Custom format lists are now grouped by category
...
When using `--list-custom-formats` with either the `sonarr` or `radarr`
subcommand, custom formats will be grouped according to the respective
tables at the top of the "Collection of custom formats" page.
2 years ago
Robert Dailey
27b252f405
chore: Update DotSettings and editorconfig files
2 years ago
Robert Dailey
6ed7961c8c
build: Use Nuget central package management
...
Move all package versions from `Directory.Build.targets` to
`Directory.Packages.props` as shown here:
https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management#enabling-central-package-management
2 years ago
Robert Dailey
8acb3e17fc
refactor: Address several SonarCloud code smells
2 years ago
Robert Dailey
cafa181424
refactor: IGuideService abstracts where the CF data comes from
2 years ago
Robert Dailey
73fb40de04
refactor: Move CF config objects to ServiceConfiguration
2 years ago
Robert Dailey
77f15b7e79
refactor: Reorganize custom format code to support reuse with Sonarr
2 years ago
Robert Dailey
f6e6644af5
refactor: Throw error if using CFs in Sonarr v3
2 years ago
Robert Dailey
e686b300b1
refactor: Better name for service compat integration test
2 years ago
Robert Dailey
defb137a25
test: Make IntegrationFixture disposable
2 years ago
Robert Dailey
c5714f2bed
feat: Add setting to specify max log files to keep
...
A new `log_janitor` setting added to `settings.yml` to allow the user to
specify the maximum number of files to keep when doing log cleanup.
Additionally, the way startup tasks occur has been cleaned up /
refactored to make it easier to integration test.
2 years ago
Robert Dailey
af001250f1
test: Allow resolution of unregistered concrete types
2 years ago
Robert Dailey
f01edc5700
refactor: Change the design pattern for settings access
...
Simplify the factory pattern so that it creates settings more directly
instead of using a silly setter method.
Also implemented `IntegrationFixture` for easier integration testing.
2 years ago
Robert Dailey
1f70e7fb61
refactor: Use lifetime scope instead of single instance
...
This allows those types to be overridden in child lifetime scopes.
2 years ago
Robert Dailey
2db0faa00c
fix(sonarr): Error when using release profiles with Sonarr v4
...
Fixes #100
2 years ago
Robert Dailey
f87971fec1
refactor: Decouple release profiles from SonarrApi class
2 years ago
Robert Dailey
28aae58298
build: Upgrade FluentValidation to 11.2.1
2 years ago
snoopy82481
28983c74f9
fix: CVE vulerabilite mitigation ( #113 )
...
Fixes #112
2 years ago
Robert Dailey
98e6b4ce59
fix(radarr): Remove all trash properties from guide CFs
...
Any property starting with `trash_` is now removed from guide CFs.
Fixes #109 .
3 years ago
Robert Dailey
37ad6fed55
feat(sonarr): New --list-qualities argument
...
For listing quality definition types in the guide.
3 years ago
Robert Dailey
e802c48e70
refactor(sonarr): Rename lister class
...
The new name better reflects its actual responsibility, which is to do
more than just print info about release profiles.
3 years ago
Robert Dailey
227e4e82e5
feat(radarr): New --list-qualities argument
...
For listing quality definition types in the guide.
3 years ago
Robert Dailey
0c835d0807
chore: Add Rider run configurations
3 years ago
Robert Dailey
fef596d5d4
refactor: Consolidate quality parser into guide service
3 years ago
Robert Dailey
07c4b48578
feat: Quality definition logic uses new JSON files
3 years ago
Robert Dailey
635e93b2db
refactor: Remove unused _fs fields
3 years ago
Robert Dailey
6400716150
refactor: Move Radarr & Sonarr code to Services directory
...
And update namespaces
3 years ago
Robert Dailey
1b9c407d97
build: Upgrade NSubstitute to v4.4.0
...
Fixes these issues that were introduced after v4.2.2:
- https://github.com/nsubstitute/NSubstitute/pull/683
- https://github.com/nsubstitute/NSubstitute/issues/685
- https://github.com/MRCollective/AutofacContrib.NSubstitute/issues/65
3 years ago
Robert Dailey
12915264dd
build: Stop using wildcard versions for nuget packages
...
In order to improve the stability and predictability of releases, I'm
favoring fixed version numbers over wildcards. This means upgrades will
be more tedious, but at least it will be easier to audit when things
break due to third party libraries.
3 years ago
Robert Dailey
1b6d42f719
refactor: Use metadata.json to find paths to CFs and RPs
3 years ago
Robert Dailey
9e3aab6e96
refactor(gui): Fix namespace for ReleaseProfileDataFilterTest
3 years ago
Robert Dailey
3b59c05d3e
build(gui): Upgrade Serilog.AspNetCore to v6.*
3 years ago
Robert Dailey
f7566030d9
build: Upgrade YamlDotNet to v12.*
3 years ago
Robert Dailey
8266410092
feat: New branch and sha1 repository settings
...
- `repository`: Branch name in the local clone to check out
- `sha1`: An explicit revision to reset to.
Fixes #27
3 years ago
Robert Dailey
1129f178a8
fix(sonarr): Validate and filter RPs after they're loaded
...
If there is invalid / empty data in the Trash Guide JSON data, filter
those out after they are loaded.
3 years ago
Robert Dailey
3a5e1f0c5e
refactor: Use IConsole instead of Console
3 years ago
Robert Dailey
8cbb9d0b46
fix: Do not dispose IConsole
3 years ago
Robert Dailey
fdd95a619f
fix: Log files did not have debug level logs
3 years ago
Robert Dailey
154ec7cf7e
feat: Deprecate `names` list for custom formats in config YAML
3 years ago
Robert Dailey
a2e287c244
feat: Introduce JSON schema into the config template
3 years ago
Robert Dailey
c0bc714739
chore: Disable warning CA1506 in Program.cs
3 years ago
Robert Dailey
5db22529ff
refactor: Custom format group table parser
3 years ago
Robert Dailey
ce1a61359d
build: Use wildcards for pkg versions in Gui project
3 years ago
Robert Dailey
b6e3552ffc
refactor: Add Serilog
3 years ago
Robert Dailey
391e12c5f6
refactor: Move AppPaths to TrashLib
3 years ago
Robert Dailey
bffaad05ee
refactor: Integrate Autofac
3 years ago
Robert Dailey
77df3038aa
refactor: Get rid of useless starter template code
3 years ago
Robert Dailey
c9331ed755
refactor: Set icon at top of side bar
3 years ago
Robert Dailey
448f364eb6
refactor: Set page title universally in MainLayout
3 years ago
Robert Dailey
49ab41fed5
refactor: Move DefaultAppDataSetup to TrashLib
3 years ago
Robert Dailey
f4ca7dcba5
refactor: Set favicon courtesy of favicon.io
3 years ago
Robert Dailey
99aae85ce2
refactor: Enable dark mode
3 years ago
Robert Dailey
1536c0f006
chore: Clean up launchSettings.json
3 years ago
Robert Dailey
502dc96ec2
chore: Add initial Blazor Server project with MudBlazor
3 years ago
Robert Dailey
be3d892a7f
refactor: Use ICollection for guide parser ret val
3 years ago
Robert Dailey
0bed055a74
refactor: NotNull extension method for IEnumerable
3 years ago
Robert Dailey
d15f329856
chore: Upgrade Autofac.Extensions.DependencyInjection to v8
3 years ago
Robert Dailey
65ec5d4446
refactor: Move AppPaths.cs to TrashLib
3 years ago
Robert Dailey
77d8c66701
build: Add commented-out property to disable GitVersion
...
Useful to use during rebase where you get build failures due to
GitVersion not liking a detached HEAD.
3 years ago
Robert Dailey
a8cce8164e
refactor: Redo initialization logic
...
Initialization logic has been completely overhauled. The previous
implementation was based on an approach that prioritized keeping the
composition root in the Program class. However, I wasn't happy with
this. CliFx inevitably wants to be the effective entry point to the
application. This means that the Program class should be as dumb as
possible.
The motivation for all this rework is the Recyclarr GUI. I need to be
able to share more initialization code between the projects.
Along with the initialization logic changes, I unintentionally
interleaved in another, completely unrelated refactoring. The IAppPaths
class now uses `IFileInfo` / `IDirectoryInfo` instead of `string` for
everything. This greatly simplified the implementation of that interface
and reduced dependencies and complexity across the code base. However,
those changes were vast and required rewriting/fixing a lot of unit
tests.
3 years ago
Robert Dailey
acd452f300
Remove Recyclarr Rider cleanup profile
3 years ago
Robert Dailey
2ba2bf299c
feat(radarr): New `--list-custom-formats` option
...
Used to build a flat list of CFs from the guide.
3 years ago
Robert Dailey
9eebc227c5
refactor(radarr): Parse guide data into objects
...
This sets the groundwork for making Radarr guide data available for
other usages beyond syncing to Radarr, such as spitting out information
to the console.
3 years ago
Robert Dailey
87830303ae
chore: Add NotNull extension method for IObservable
...
The main purpose of this is to force type `T` to not be nullable. If you
just use `Where()`, then you still get `IObservable<T?>`.
3 years ago
Robert Dailey
4cf8731efb
fix: Set repo URL from settings
...
If a user changed the repo URL after a clone was performed, it would not
get used.
Fixes #90
3 years ago
Robert Dailey
3c9a2d3337
fix: Follow-up changes for 0839e88
3 years ago
Robert Dailey
b41ed72283
fix: Do not parse NULL into empty collections
...
When you specify an empty object in YAML, like:
```
quality_profiles:
```
This causes that respective object/collection to be assigned `null`.
YamlDotNet feature request covering this behavior can be found
[here][1].
Fixes #89 .
[1]: https://github.com/aaubry/YamlDotNet/issues/443
3 years ago
Robert Dailey
0839e88ed4
fix: Use a less severe and better worded warning msg for CF scores
...
If scores are missing from a CF in either the guide or in the YAML
config, that CF is still synced but no score will be set in any quality
profiles.
The warning message for this was a bit misleading. It made users think
the CF itself would not be synced. The CF is always synced.
The message has been reworded to make this more clear and it is
downgraded from Warning to Informational.
3 years ago
Robert Dailey
68f89f6cb5
fix(sonarr): Skip over invalid release profile JSON files
...
Fixes #87
3 years ago
Robert Dailey
5ad8db1294
fix: Do not throw when no instances are defined in YAML files
...
Reason: Users may use a combination of YAML files, some may not have
both radarr and sonarr config sections in them. We should gracefully
pass over these to allow other configs to be processed.
Should the final list still be empty, the program can gracefully exit
having done no work.
3 years ago
Robert Dailey
20b6921b0f
refactor: Quality Definition parsers use files from local clone
3 years ago
Robert Dailey
0d71e341d5
refactor: Add request/response body to debug logs
3 years ago
Robert Dailey
82856495b5
refactor: Log the app data directory
3 years ago
Robert Dailey
850a0d5fd3
feat: Global app data via environment variable
...
Specify `RECYCLARR_APP_DATA` so that every command inherits and uses
that path for its application data. This behaves the same as if you had
specified the `--app-data` option for every invocation of Recyclarr.
3 years ago
Robert Dailey
9618a0eadc
fix: create-config accepts YAML file name again instead of directory
3 years ago
Jonas Geiler
ce7f338881
fix: updated "EVO (no WEBDL)" custom format in config template
...
Fixes #77
3 years ago
Robert Dailey
eb394f8ca1
build: Upgrade System.IO.Abstractions to v17
3 years ago
Robert Dailey
9a854b2aa3
build: Upgrade GitHubActionsTestLogger to v2
3 years ago
Robert Dailey
b502610801
build: Upgrade FluentValidation to v11
3 years ago
Robert Dailey
8522a5d39d
test: Clean up unnecessary code
3 years ago
Robert Dailey
f6248b6b76
fix(radarr): Load cache json using snake case
...
The main symptom of this was that CFs were not deleted when the
`delete_old_custom_formats` property was enabled.
This fixes #71
3 years ago
Robert Dailey
d4380bc11d
chore: Add System.IO.Abstractions.Extensions to all tests
3 years ago
Robert Dailey
7daca894f7
fix(migrate): Skip moving cache directory if it does not exist
3 years ago
Robert Dailey
bf8b860951
fix: Properly handle manually specified path in create-config
3 years ago
Robert Dailey
38b6ab5131
fix: Fix IAppPaths access issue in create-config
3 years ago
Robert Dailey
cd9d9e7cdc
fix: Simplify app data migration
...
Due to the failures related to symlinks in the repo directory that
happened when doing a full directory merge, the migration logic has been
simplified. It now only copies useful YAML files and cache data. The
repo directory is ignored and will need to be re-cloned when the user
runs `recyclarr` next time.
3 years ago
Robert Dailey
da38fd597f
refactor: Move NormalizePath logic to TestLibrary
3 years ago
Robert Dailey
bf7d884183
fix: Migration logic now handles symlinks (sort of)
...
Symlinks are difficult to deal with. At this point, it was still failing
to migrate the `.config/recyclarr/repo` directory. Even though it still
doesn't work 100%, I'm going to leave it as it is and instead simplify
what gets migrated later.
3 years ago
Robert Dailey
f5ce60589d
feat: Debug logs for trash-updater dir migration
3 years ago
Robert Dailey
37d52b583a
feat: Debug diagnostics for migrate subcommand
3 years ago
Robert Dailey
c593675f3d
ci: Move publish properties to ps1
...
Moving these out allows custom `dotnet publish` commands to be run, such
as creating a portable build without having to specify --runtime.
3 years ago
Robert Dailey
d499537f91
fix: Improve app data migration logic
...
Smarter migration logic that does a directory merge instead of a
straight move. This is designed to fail less in cases like the
`recyclarr` directory already existing.
3 years ago
Robert Dailey
d50e08b1e3
refactor: Add MergeDirectory() method + tests
3 years ago
Robert Dailey
276f59ae8c
feat: New migrate subcommand
...
Automatic migration no longer takes place. Instead, the user must run
`recyclarr migrate` to have those migration steps executed
automatically, or do it manually.
3 years ago
Robert Dailey
bba4d2a08a
fix: Log files were empty & incorrect formatting
3 years ago
Robert Dailey
23c6871d41
refactor: Create app data subdirectories on startup
3 years ago