recyclarr / recyclarr

Automatically sync TRaSH Guides to your Sonarr and Radarr instances
https://recyclarr.dev
MIT License
1.13k stars 31 forks source link

Score Scale #208

Open yammes08 opened 1 year ago

yammes08 commented 1 year ago

Is there an existing issue for this?

Feature Description

A new feature called score_scale. This feature would allow a user to set a scale value for any custom format score, in the same way that a score can currently be manually set. Example:

custom_formats:
      - trash_ids:
      # Audio
          - 496f355514737f7d83bf7aa4d24f8169  # TrueHD Atmos
          - 2f22d89048b01681dde8afe203bf2e95  # DTS X
          - 417804f7f2c4308c1f4c5d380d4c4475  # ATMOS (undefined)
          - 1af239278386be2919e1bcee0bde047e  # DD+ ATMOS
          - 3cafb66171b47f226146a0770576870f  # TrueHD
          - dcf3ec6938fa32445f590a4da84256cd  # DTS-HD MA
          - a570d4a0e56a2874b64e5bfa55202a1b  # FLAC
          - e7c2fcae07cbada050a0af3357491d7b  # PCM
          - 8e109e50e0a0b83a5098b056e13bf6db  # DTS-HD HRA
          - 185f1dd7264c4562b9022d963ac37424  # DD+
          - f9f847ac70a0af62ea4a08280b859636  # DTS-ES
          - 1c1a4c5e823891c75bc50380a6866f73  # DTS
          - 240770601cc226190c367ef59aba7463  # AAC
          - c2998bd0d90ed5621d8df281e839436e  # DD
        quality_profiles:
          - name: My Lovely Profile
            score_scale: 0.1

The example above is a real-world use case, where some users score audio custom formats at 10% of their guide scores so that they are not so heavily weighted.

rcdailey commented 1 year ago

How is this better than running the calculation manually and inputting the result as a manual score?

yammes08 commented 1 year ago

If the guide score changes, you wouldn't need to update your config file. If you're doing it all manually then you would.

rcdailey commented 1 year ago

That's fair, I guess what I'm really asking is this. Normally when we deviate from guide scores, the recommendation is an absolute number. In other words, when we want Dual Audio for anime, we offer options like 10 and 100 or sometimes 101. Those are more difficult to represent in terms of percentages (or ratios) of the original base value.

To be clear, I don't have an issue with the idea itself. I'm just trying to better understand the motivation here. I'm interested in understanding how this is effective. What is a real world example that would benefit from this feature and how does it benefit?

yammes08 commented 1 year ago

That's fair, I guess what I'm really asking is this. Normally when we deviate from guide scores, the recommendation is an absolute number. In other words, when we want Dual Audio for anime, we offer options like 10 and 100 or sometimes 101. Those are more difficult to represent in terms of percentages (or ratios) of the original base value.

To be clear, I don't have an issue with the idea itself. I'm just trying to better understand the motivation here. I'm interested in understanding how this is effective. What is a real world example that would benefit from this feature and how does it benefit?

The only real-word example I'm aware of is the one I mentioned above about audio formats, where some folks score these at 10% of the base value so that they're not so heavily weighted. That's not any sort of guide recommendation, it's a solution that users found for themselves.

I don't think this is a 'must' by any means. It's just another option for flexibility and score manipulation.

rcdailey commented 1 year ago

Sorry, I forgot that you already mentioned in the OP that it is a real-world example. It's not a bad idea but probably won't get priority any time soon.

I appreciate the report!

fhriley commented 6 months ago

I also want this feature, except I don't like how it's being requested to be implemented. I think it should be something like adjust_score, where the value just gets added to the trash score to get the final score. For example, I currently have this:

custom_formats:
    - trash_ids:
        - 7878c33f1963fefb3d6c8657d46c2f0a # DV HDR10
        - 2b239ed870daba8126a53bd5dc8dc1c8 # DV HDR10Plus
      quality_profiles:
        - name: Any
          score: 1550
        - name: Bluray Remux
          score: 1550
        - name: 1080p
          score: 1550

I would much rather do this:

custom_formats:
    - trash_ids:
        - 7878c33f1963fefb3d6c8657d46c2f0a # DV HDR10
        - 2b239ed870daba8126a53bd5dc8dc1c8 # DV HDR10Plus
      quality_profiles:
        - name: Any
          adjust_score: 50
        - name: Bluray Remux
          adjust_score: 50
        - name: 1080p
          adjust_score: 50

As noted by OP, this is better because it will continue to work if the trash scores are updated, whereas the absolute score will not.

rcdailey commented 6 months ago

What if I supported something like this?

custom_formats:
    - trash_ids:
        - 7878c33f1963fefb3d6c8657d46c2f0a # DV HDR10
        - 2b239ed870daba8126a53bd5dc8dc1c8 # DV HDR10Plus
      quality_profiles:
        - name: Any
          score: 50 # Score is set to exactly 50
        - name: Bluray Remux
          score: +50 # Score is set to DEFAULT+50
        - name: 1080p
          score: -50 # Score is set to DEFAULT-50

Basically you can specify a relative score to subtract or add to the default value.

fhriley commented 6 months ago

What if I supported something like this?

custom_formats:
    - trash_ids:
        - 7878c33f1963fefb3d6c8657d46c2f0a # DV HDR10
        - 2b239ed870daba8126a53bd5dc8dc1c8 # DV HDR10Plus
      quality_profiles:
        - name: Any
          score: 50 # Score is set to exactly 50
        - name: Bluray Remux
          score: +50 # Score is set to DEFAULT+50
        - name: 1080p
          score: -50 # Score is set to DEFAULT-50

Basically you can specify a relative score to subtract or add to the default value.

I'm good with that, but I think it might confuse people because I'm pretty sure you'd have to specify the + version as a string. Otherwise your code will just get it as a positive number. For example:

score: 50 == score: +50, so the user would have to do score: "+50"

EDIT: the same applies for negative

EDIT 2: Upon further thought, this would take away user's ability to specify negative scores, unless you used the string version, which I think would be really confusing.

rcdailey commented 6 months ago

Ah good catch. I didn't think it all the way through. The spirit of what I was trying to capture is that we could allow people to specify relative score offsets. I initially thought of some small template language like score: {DEFAULT}+50 but thought that's too confusing, and score: +50 would be more concise, but that won't work for reasons you mentioned.

I realize I could go with something like add_score: 50 and subtract_score: 50 but that looks a little ugly to me. Your idea of using adjust_score might work but it needs to be able to indicate either subtraction or addition.

EDIT: Actually maybe adjust_score will work just fine: adjust_score: 50 is the same as +50 and adjust_score: -50 is the same as -50 in my earlier example. So yeah, I like this, and I think that'll be what I go with.