Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Apr 23, 2024

Conversation

rcdailey
Copy link
Contributor

@rcdailey rcdailey commented Nov 24, 2023

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
Copy link
Contributor Author

@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
Copy link
Contributor Author

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 rcdailey marked this pull request as draft November 30, 2023 17:47
@bakerboy448 bakerboy448 added Status: In Progress Work in progress Do Not Merge Do Not Merge labels Nov 30, 2023
@github-actions github-actions bot added the Area: Backend Backend Changes, not related to a specific section label Dec 15, 2023
@TRaSH-
Copy link
Contributor

TRaSH- commented Dec 19, 2023

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

@yammes08 yammes08 changed the title Add initial quality profile JSON files for Radarr feat(Guides): Add Quality Profile JSON Files for Use by Guide Sync Tools Dec 19, 2023
@yammes08
Copy link
Contributor

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 yammes08 changed the title feat(Guides): Add Quality Profile JSON Files for Use by Guide Sync Tools feat(backend): Add Quality Profile JSON Files for Use by Guide Sync Tools Dec 19, 2023
@rcdailey rcdailey force-pushed the quality-profile-json branch from f9910a9 to b39a42e Compare January 1, 2024 05:11
@TRaSH-
Copy link
Contributor

TRaSH- commented Mar 24, 2024

When can this be merged for testing? And updating?

@yammes08 yammes08 marked this pull request as ready for review April 22, 2024 17:44
@yammes08 yammes08 added Type: Enhancement Feature Request or Improvement of suboptimal status quo Status: Review Needed Ready for Review Area: Sonarr Sonarr Related Area: Radarr Radarr Related and removed Status: In Progress Work in progress Do Not Merge Do Not Merge labels Apr 22, 2024
@yammes08 yammes08 requested a review from a team April 22, 2024 17:46
rcdailey and others added 8 commits April 22, 2024 17:42
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.
- Renamed HD Bluray + WEB and UHD Bluray + WEB profile JSONs to be consistent with the profile names
- Added Custom Format Group JSONs for:
  - Advanced Audio Formats
  - Optional Custom Formats
- Fixes and updates for quality profile JSONs:
  - Removed non-mandatory custom formats
  - Removed incorrect custom formats
  - Fixed incorrect minimum profile scores for SQP-2/3/4/5
  - Renamed merged quality group for SQP-5
  - Reordered custom formats to match respective guide pages
- Created quality profile JSONs for Sonarr
- Created Optional CF group JSON for Sonarr
- Created HDR Formats CF group JSONs for Radarr and Sonarr
- Created Advanced Audio Formats CF group JSON for Sonarr
- Added `trash_score_sets` to relevant quality profile JSONs
- Fixed incorrect `required` variable inn Radarr Optional CF group JSON
- Create new JSONs for Optional UHD custom format groups
- Amend existing Optional custom format group JSONs to exclude relevant UHD profiles
- Add DV HDR10Plus custom formats to relevant profile and group JSONs.
- Updated all jsons to match latest guide updates
- Swapped `x265 (HD)` and `x265 (no HDR/DV)` for all UHD-capable profiles. This makes `x265 (no HDR/DV)` mandatory and `x265 (HD)` optional
- Update jsons with latest guide profile updates
- Swapped `x265 (HD)` and `x265 (no HDR/DV)` for WEB-2160p profile. This makes `x265 (no HDR/DV)` mandatory and `x265 (HD)` optional
- Updated Radarr quality profile JSONs to match current profile state
- Updated Sonarr quality profile JSONs to match current profile state
@rcdailey rcdailey force-pushed the quality-profile-json branch from 5198e4f to 2e6af8c Compare April 22, 2024 22:43
@github-actions github-actions bot removed Area: Sonarr Sonarr Related Area: Radarr Radarr Related labels Apr 22, 2024
@bakerboy448
Copy link
Contributor

bakerboy448 commented Apr 23, 2024

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 😅

@TRaSH- TRaSH- merged commit 44d3f87 into TRaSH-Guides:master Apr 23, 2024
10 checks passed
@rcdailey
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Backend Changes, not related to a specific section Status: Review Needed Ready for Review Type: Enhancement Feature Request or Improvement of suboptimal status quo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants