Robert Dailey
76d4d9fbcb
build: Remove empty csproj folders
1 year ago
Robert Dailey
8d63737078
test: Fix broken exception handler tests
1 year ago
Robert Dailey
7f332406f1
fix: Better wording for logs containing remote service error msgs
1 year ago
Robert Dailey
9a26348d26
fix: Properly sync IncludeCustomFormatWhenRenaming
1 year ago
Robert Dailey
93c8de9739
fix: Print score instead of object
1 year ago
Robert Dailey
9995572314
fix: Propagate base_url and api_key when processing includes
1 year ago
Robert Dailey
537defbfe3
build: Upgrade Automapper Autofac library to stable version
1 year ago
Robert Dailey
e7bd06eb61
chore: Delete unwanted run configurations
1 year ago
Robert Dailey
f905b251dc
refactor: Remove unneeded FileName property
1 year ago
Robert Dailey
1aaa2747b8
fix: Move detailed CF output to debug logs
1 year ago
Robert Dailey
159861aaeb
refactor: Split Recyclarr.TrashLib project
...
Split into Config and Guide class library projects to help decouple and
componentize the TrashLib library, which is growing too big.
1 year ago
Robert Dailey
82cbfb3741
refactor: Separate JSON loading from CFs
1 year ago
Robert Dailey
016bcb6624
refactor: Centralize JSON serializer settings
1 year ago
Robert Dailey
8f267483a2
feat: Add list command for template includes
1 year ago
Robert Dailey
5bb2bfa8a0
feat: YAML includes
...
Fixes #175
1 year ago
Robert Dailey
175aa6733b
refactor: Reorganize config list command code
...
This is in preparation for changes to list template includes
1 year ago
Robert Dailey
3e86172831
refactor: Remove unneeded NotImplementedException
1 year ago
Robert Dailey
542b24baa4
build: Upgrade FluentAssertions.Analyzers
1 year ago
Robert Dailey
ef8ae7dd48
refactor: Centralize repo updating
...
Repo updating is also a little more robust now.
1 year ago
Robert Dailey
b5c49d81c5
test: Suppress NSubstitute NS5000
...
Reason: https://github.com/nsubstitute/NSubstitute.Analyzers/issues/211
1 year ago
Robert Dailey
38755aa81a
refactor: Remove System.IO.Abstractions.Extension namespace usage
1 year ago
Robert Dailey
bda8dabd01
build: Upgrade all nuget packages
1 year ago
Robert Dailey
6ac1f0a1f0
chore: Exclude all but CS files in SonarLint
1 year ago
Robert Dailey
06cdd992e9
chore: Add SonarLint settings for Rider
1 year ago
Robert Dailey
740f775aeb
build: Remove SonarAnalyzer.CSharp package
1 year ago
Robert Dailey
bede64eadd
refactor: Rework ConfigCreation unit tests
1 year ago
Robert Dailey
3a50b9fa61
fix: Add validation for duplicate instances
...
Two separate duplicate checks have been introduced:
1. Within the same YAML file, YamlDotNet has been instructed to error on
duplicate keys.
2. Between different YAML files, custom logic enforces that there should
be no duplicate instance names.
1 year ago
Robert Dailey
6706a87972
test: Relocate & rename config extensions test
1 year ago
Robert Dailey
3255dc68eb
test: Fix broken unit test after scoreless CF changes
1 year ago
Robert Dailey
b409dd7c2d
build: Globally use package SonarAnalyzer.CSharp
1 year ago
Robert Dailey
f52d73cdaf
fix: Less verbose logging for scoreless CFs
1 year ago
Robert Dailey
0b82c3bea3
fix: Better processing for HTTP 500 service responses
...
Fixes #206 .
1 year ago
Robert Dailey
372fd804fe
refactor: Replace TestCorrelator with Observable sink
...
This replacement is necessary to support parallelized unit tests.
TestCorrelator as well as even the InMemory sink rely on static objects,
which makes multithreaded tests impossible.
1 year ago
Robert Dailey
aaf810fd68
feat: Print completed date & time after each instance sync
1 year ago
Robert Dailey
4d7a5f49c3
fix: NRE when `reset_unmatched_scores` not present
1 year ago
Robert Dailey
3f5960c414
feat: Add score sets and raw output to list custom-formats
1 year ago
Robert Dailey
4f52201ede
feat: Support for "score sets" in quality profiles
...
A score set is a collection of scores defined by a single custom format
JSON data file in the TRaSH Guides. Score sets provide a way to define
"themes" for scores that get used across multiple custom formats.
This feature adds the `score_sets` property to the top-level
`quality_profiles` objects.
1 year ago
Robert Dailey
f9ba985d1f
fix: Grab scores from the `trash_scores` object in CF json data
...
The `default` key is assigned a score intended to replace the old
`trash_score` property.
1 year ago
Robert Dailey
4935377a4b
refactor: Remove GetOrDefault method
...
Replaced with .NET's `GetValueOrDefault()`
1 year ago
Robert Dailey
c4bd5b2fae
style: Solution-wide code cleanup to CS files
1 year ago
Robert Dailey
8b350b5bce
feat: Add exclusions support to 'reset_unmatched_scores'
...
A new `except` property is provided under `reset_unmatched_scores` to
list one or more custom format names to exclude when resetting scores.
1 year ago
Robert Dailey
c033dd8a13
refactor: Change structure of processed QP object
1 year ago
Robert Dailey
de0c6be1d9
fix: Move log context up to ConfigurationLoader
...
This allows log context to be available when validation warnings &
errors are printed.
1 year ago
Robert Dailey
4b3542fc7a
fix: Add a check for Sonarr v3 in the delete CFs command
1 year ago
Robert Dailey
f6465316d2
feat: New delete custom-formats command
...
For deleting one or many custom formats from a specific Sonarr or Radarr
service.
1 year ago
Robert Dailey
a84c8a0efc
refactor: Improve service connection error message
...
When unable to connect to a service, we no longer send a confusing
message saying capabilities could not be obtained. This also involved
removing nullability in a few places to simplify logic an error
handling.
1 year ago
Robert Dailey
3ac1de9c94
refactor: Rename placement argument for service
1 year ago
Robert Dailey
c713b99747
refactor: Make out variables inline
1 year ago
Robert Dailey
c9d015f492
test: Fix newline insertion in MockYaml method
1 year ago
Robert Dailey
0f88f2a306
fix: Detect & fail on split instance config files
...
When the same `base_url` is used between two or more config files, this
is an error the user must fix manually.
1 year ago
Robert Dailey
58861a4edd
build: Upgrade all nuget packages
1 year ago
Robert Dailey
b79a71a1cf
test: Fix broken tests due to mistakenly removed whitespace
1 year ago
Robert Dailey
c190d5e6d6
refactor: Use raw string literals for multi-line strings
1 year ago
Robert Dailey
d6fc96f247
fix: Allow quality group names to duplicate quality names.
...
Fixes #200
1 year ago
Robert Dailey
e6924c10e4
fix: Better error message when no config files are found
1 year ago
Robert Dailey
028f9be125
refactor: Remove TODO comment
...
This is in favor of a TODO item put in issue #202
1 year ago
Robert Dailey
a6e737fae9
fix: Improve repo clone performance by using shallow clones
...
Fixes #201 .
1 year ago
Robert Dailey
01fdc0639f
fix: Output more detail about HTTP 4xx "bad data" responses
1 year ago
Robert Dailey
aa8140add4
refactor: Print more information about QP updates
1 year ago
Robert Dailey
e0da419ffa
refactor: Address several analysis warnings
1 year ago
Robert Dailey
def934ebeb
refactor: Upgrade FileSystem to remove hack
...
This version of `System.IO.Abstractions` adds constructor options to
`MockFileSystem` that allows the removal of a hack put in place to
remove the temp directory so it does not interfere with unit test
expectations.
1 year ago
Robert Dailey
a6ceae65fc
refactor: Add SonarCloud Analyzer and fix analysis warnings
1 year ago
Robert Dailey
8596168757
feat: Add Allowed flag for QP upgrades
1 year ago
Robert Dailey
0652cfd800
fix: More robust handling of missing qualities list
...
When qualities are not specified by the user, qualities are not modified
if the profile exists in the service. If the profile does not exist yet,
then an error is shown. Qualities are required when the profile is being
created.
1 year ago
Robert Dailey
f40339e794
style: Code cleanup
1 year ago
Robert Dailey
1d7abb3977
refactor: Fix analysis warnings
1 year ago
Robert Dailey
ade5ee72b2
fix: Cutoff set properly when disabling upgrades
...
The `qualityprofile` API still performs validation on `cutoff` even when
`upgradeAllowed` is set to `false`. Because of this, we must still set
`cutoff` even if the user didn't specify `upgrade_allowed` and
`until_quality` in their configs. We do so by finding the first item in
the Items list, regardless of what that is. This fixes the HTTP 400 we
get when invoking the API with a `null` value for `cutoff`.
1 year ago
Robert Dailey
6bb7980827
fix: Preview and stat logging are more accurate
...
The assignment logic in the DTO objects changes the end result of what
gets synced. The preview and stat logic now first assigns config values
to the old DTO object to get a more accurate preview of what the new
values will be.
1 year ago
Robert Dailey
83cc0a77ee
refactor: Address resharper warnings
1 year ago
Robert Dailey
ce338e24f3
feat: Quality profile sync
...
Initial implementation with sync support for the following fields:
- Name
- Upgrade Allowed
- Min Format Score
- Cutoff
- Cutoff Format Score
- Items
Quality profiles are always created if they are defined under
`quality_profiles` at the top-level. Within a quality profile
configuration, Recyclarr will not modify quality profile fields if those
corresponding properties in the config are omitted.
1 year ago
Robert Dailey
31896828bc
chore: Disable changing expression body to normal body in code cleanup
2 years ago
Robert Dailey
84b9db13f4
refactor: Print full exception stack trace to console
...
Previously, the exception stack trace was omitted to simplify the
console output. However, some situations occurred where an exception was
logged but I couldn't tell where it came from. This made certain rare
bugs impossible to fix.
My philosophy at this point is: If something exceptional happens, we
don't really care about a "clean" console output anymore...
2 years ago
Robert Dailey
aebdb257d0
build: Upgrade FluentValidation and JetBrains.Annotations
2 years ago
Robert Dailey
7d757c0d5f
fix: Better error messages for non-existent config files
2 years ago
Robert Dailey
ea09ddfb00
fix: Markup issue when printing exception message
...
Just remove the special formatting for command runtime exception
messages.
Fixes #192
2 years ago
Robert Dailey
abcf4f7d8f
feat: api_key and base_url are now optional
...
These can be implicitly set via secrets that follow a naming convention.
2 years ago
Robert Dailey
9d085e33c2
refactor: Fix warning about unused getter
2 years ago
Robert Dailey
e47a335bb6
build: Upgrade multiple nuget packages
2 years ago
Robert Dailey
7c5da06e57
refactor: Remove instance name from cache storage path
...
This step is necessary to support merging of instance sections based on
a shared URL.
2 years ago
Robert Dailey
241eb261e9
test: Verify CF in cache but not in service
2 years ago
Robert Dailey
efd1863efd
refactor: Improve request/response body logging
2 years ago
Robert Dailey
9bdb5f364c
refactor: Improve logging for caching logic
2 years ago
Robert Dailey
67d604d8a0
refactor: Log format ID in logs
2 years ago
Robert Dailey
5a3b850f11
style: Code cleanup on CS files
2 years ago
Robert Dailey
c1b87f4b8b
fix: NRE due to null RootConfigYaml
2 years ago
Robert Dailey
58927728f8
fix: Clone/update config repo in config create command
2 years ago
Robert Dailey
7733b5e569
fix: Update default clone URL for trash guides repo
...
New URL: https://github.com/TRaSH-Guides/Guides.git
2 years ago
Robert Dailey
010c788e14
feat: Add migration step to delete old repo directory
2 years ago
Robert Dailey
406e0590a4
fix: Refactor and re-introduce capability enforcement
...
Fixes #189
2 years ago
Robert Dailey
f020459023
fix: Do not exit application when instance sync fails
2 years ago
Robert Dailey
0eb084b146
style: Code cleanup
2 years ago
Robert Dailey
f05ff6e04b
fix: Service cache now remembers CFs no longer in config
...
With `delete_old_custom_formats: false` and
`replace_existing_custom_formats: false`, if you comment out a CF in
your configuration, sync, uncomment it and sync again, you get an error
about duplicate CFs. This is because, once a CF is removed from the
configuration, it's also removed from the cache.
This change makes the cache more flexible. As long as a CF (created by
Recyclarr) exists either in the config OR in the service itself, it will
be kept in the cache. This means that temporarily disabling CFs in
configuration won't cause ownership issues.
2 years ago
Robert Dailey
f06a2c829a
refactor: Move Cache code files to Cli project
2 years ago
Robert Dailey
715d777f9e
refactor: replace morelinq with superlinq
2 years ago
Robert Dailey
2a28130599
fix: Do not unconditionally show deleted custom formats
...
When `delete_old_custom_formats` is `false`, we should not show deleted
custom formats.
2 years ago
Robert Dailey
d799da385e
fix: Regression caused reset_unmatched_scores: false to not be respected
2 years ago
Robert Dailey
fd8a2f570b
test: Add AutoFixture to global usings in Cli test project
2 years ago
Robert Dailey
11f3ab005b
feat: Continue running if git fetch fails
...
As long as there's a valid clone available and no other git commands
fail, we allow `git fetch` to fail and proceed processing commands. Even
if internet connectivity is down, that shouldn't necessarily prevent
sync from functioning.
The primary motivation for this change is that we expect the Trash
Guides repo to be relocated soon and I do not want that to cause the
program to stop working between the change and when I can update the
URL.
2 years ago
Robert Dailey
596fc72dfe
build: Remove debug option from sync run configuration
2 years ago
Robert Dailey
ee377e55fa
feat: Create configs from templates
2 years ago
Robert Dailey
ca941ac31d
refactor: Rename ConfigListCategory enum
2 years ago
Robert Dailey
d5c4a5d8ec
test: Remove unused FileSystem extension methods
2 years ago
Robert Dailey
e61a23e649
build: Upgrade all nuget packages
2 years ago
Robert Dailey
fe7773ea07
fix: Fix false-positive duplicate score warnings
...
When doing a `sync --preview`, new custom formats are not created and
thus they never get an ID greater than `0`. Because of this, a
dictionary that tracks duplicates based on ID would result in warnings
about duplicate scores that made no sense.
We now index by Trash ID instead of Format ID, which is more accurate.
2 years ago
Robert Dailey
018d5f0157
refactor: Add back ToString() overrides
...
This fixes a warning related to ToString() returning null.
2 years ago
Robert Dailey
ebdea5eabf
build: Add debug option to sync preview run config
2 years ago
Robert Dailey
6b3bf893b5
build: Use debug option with sync command
2 years ago
Robert Dailey
be7dac7e62
build: Upgrade all nuget packages
2 years ago
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