1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-22 07:43:13 +00:00

hdonly: simplify IF OR

I've tested this using blutopia which is also a json site for a POC and it seems to work
This commit is contained in:
Garfield69 2024-12-09 18:24:16 +13:00
parent ab120c2f9f
commit 1b4590b0d6

View file

@ -254,7 +254,7 @@ search:
- name: append - name: append
args: ".{{ .Result.year }}.{{ .Result._episode_info }}.{{ .Result._format }}.{{ .Result._encoding }}.{{ .Result._media }}{{ if eq .Result._hdr \"True\" }}.HDR{{ else }}{{ end }}.{{ if eq .Result._hdr10plus \"True\" }}.HDR10+{{ else }}{{ end }}.{{ if eq .Result._dovi \"True\" }}.DoVi{{ else }}{{ end }}" args: ".{{ .Result.year }}.{{ .Result._episode_info }}.{{ .Result._format }}.{{ .Result._encoding }}.{{ .Result._media }}{{ if eq .Result._hdr \"True\" }}.HDR{{ else }}{{ end }}.{{ if eq .Result._hdr10plus \"True\" }}.HDR10+{{ else }}{{ end }}.{{ if eq .Result._dovi \"True\" }}.DoVi{{ else }}{{ end }}"
- name: append - name: append
args: "{{ if eq .Result._vf2 \"True\" }}.MULTI{{ else }}{{ end }}{{ if or (eq .Result._vff \"True\") (eq .Result._vfq \"True\") }}.MULTI{{ else }}{{ end }}{{ if or (eq .Result._vfi \"True\") (eq .Result._vf \"True\") }}.MULTI{{ else }}{{ end }}" args: "{{ if or (eq .Result._vf2 \"True\") (or (eq .Result._vff \"True\") (or (eq .Result._vfq \"True\") (or (eq .Result._vfi \"True\") (eq .Result._vf \"True\")))) }}.MULTI{{ else }}{{ end }}"
- name: re_replace - name: re_replace
args: ["(\\.MULTI)\\1", ".MULTI"] args: ["(\\.MULTI)\\1", ".MULTI"]
- name: append - name: append