uhdbits: fix parsing the last word as release group for music (#14031)

This commit is contained in:
Bogdan
2023-02-16 21:05:11 +02:00
committed by GitHub
parent 0acade153b
commit 1f30b653d1

View File

@@ -94,13 +94,15 @@ search:
selector: table#torrent_table > tbody > tr.torrent selector: table#torrent_table > tbody > tr.torrent
fields: fields:
category: # note: there are optional extra colums
category_id:
selector: a[href^="torrents.php?filter_cat"] selector: a[href^="torrents.php?filter_cat"]
attribute: href attribute: href
filters: filters:
- name: regexp - name: regexp
args: "\\[(\\d+)\\]" args: "\\[(\\d+)\\]"
# note: there are optional extra colums category:
text: "{{ .Result.category_id }}"
download: download:
selector: a[href^="torrents.php?action=download&id="] selector: a[href^="torrents.php?action=download&id="]
attribute: href attribute: href
@@ -157,7 +159,7 @@ search:
- name: replace - name: replace
args: [" / ", " "] args: [" / ", " "]
- name: re_replace - name: re_replace
args: ["\\b([\\w@\\.]+)$", " -$1"] args: ["\\s+([\\w@\\.\\[\\]\\$\\-\\!\\u2122]+)$", " -$1"]
- name: re_replace - name: re_replace
args: ["\\bEncode\\b", "Blu-Ray"] args: ["\\bEncode\\b", "Blu-Ray"]
- name: re_replace - name: re_replace
@@ -166,6 +168,16 @@ search:
args: ["\\bRemux\\b", "Blu-Ray Remux"] args: ["\\bRemux\\b", "Blu-Ray Remux"]
- name: re_replace - name: re_replace
args: ["\\s+", " "] args: ["\\s+", " "]
_release_info_music:
selector: div.torrent_info
remove: .torrent_label.red, .torrent_label.blink_me
filters:
- name: re_replace
args: ["[\\s\\/]+$", ""]
- name: replace
args: [" / ", " "]
- name: re_replace
args: ["\\s+", " "]
title: title:
selector: div.group_info selector: div.group_info
remove: span, div.tags, div.torrent_info remove: span, div.tags, div.torrent_info
@@ -174,5 +186,5 @@ search:
args: ["(?i)\\bSeason (\\d+)\\b", "S$1"] args: ["(?i)\\bSeason (\\d+)\\b", "S$1"]
- name: trim - name: trim
- name: append - name: append
args: " {{ .Result._release_info }}" args: " {{ if eq .Result.category_id \"2\" }}{{ .Result._release_info_music }}{{ else }}{{ .Result._release_info }}{{ end }}"
# Gazelle # Gazelle