Guides icon indicating copy to clipboard operation
Guides copied to clipboard

feat(backend): Add Quality Profile JSON Files for Use by Guide Sync Tools

Open rcdailey opened this issue 2 years ago • 4 comments

Pull Request

Purpose

To add JSON files to the guide repository which act as a central data source for quality profile configuration and content for use by guide sync tools.

Approach

These files were auto-generated by an exporter tool provided by nitsua. The source of the exported data was one of Trash's Radarr instances. The following transformations were performed on the data model provided by Radarr. All of these are motivated by providing a simpler JSON file schema for guide contributors and eliminating redundant data.

  • Any id fields are omitted (for items especially) since those can vary from instance to instance.
  • The formatItems array represents a mapping of Custom Format Name to Custom Format Trash ID. The name itself is for documentation purposes only and serves no functional purpose; think of it as a comment that exists only to describe the CF identified by the trash ID next to it. The Trash ID itself is self explanatory; that is used by tooling to identify the CF JSON file paired with the quality profile.
  • Greatly simplified the items structure (this is the list of qualities and/or groups). The following rules must be adhered to:
    • The allowed property is required. It must be either true or false. This corresponds to the enabled/disabled toggle in the Radarr UI.
    • For qualities, name must match an existing quality exactly, including case. For groups, name can be whatever you want as long as it is unique.
    • For groups, a nested items array may be provided which identifies two or more quality names within it.
    • All qualities must be present and none omitted, even if their allowed property is set to false. This ensures explicit ordering in the guides.

Open Questions and Pre-Merge TODOs

This is a WIP, final implementation to be agreed

Requirements

rcdailey avatar Nov 24 '23 05:11 rcdailey

@yammes08 Let me know your thoughts. I'm specifically interested in what you think about the formatItems array. Our JSON files do not support comments, so having a string next to it was the next best thing. Do you find that helpful or confusing? If it's not valuable we can remove. I personally felt that having just a trash Id there would make it hard for guide contributors to know what CF it is without constantly cross-referencing JSON files.

rcdailey avatar Nov 24 '23 05:11 rcdailey

I'm marking this PR as a draft because after discussion with @austinwbest and @yammes08, we're going to add some more data here specific to quality profile grouping.

rcdailey avatar Nov 30 '23 17:11 rcdailey

can this PR be renamed correctly by following the Contributing Guidelines for pull request naming

TRaSH- avatar Dec 19 '23 15:12 TRaSH-

can this PR be renamed correctly by following the Contributing Guidelines for pull request naming

Have updated PR title and initial comment to better match contributing guidelines.

yammes08 avatar Dec 19 '23 16:12 yammes08

When can this be merged for testing? And updating?

TRaSH- avatar Mar 24 '24 17:03 TRaSH-

Can we get an update to contributors as well for how to use / when this needs updating?

so we don't forget in a few months 😅

bakerboy448 avatar Apr 23 '24 00:04 bakerboy448

Can we get an update to contributors as well for how to use / when this needs updating?

so we don't forget in a few months 😅

These files should be updated any time there are changes in the guide. Not every change demands a change to these files, such as CF changes. But certainly if any quality profiles change, there's likely to be an identical update needed in these files.

I agree the contributing file should be updated. But I think I want to discuss process with @TRaSH- first.

rcdailey avatar Apr 23 '24 12:04 rcdailey