keepfriends: add config option to use English titles when available. resolves #8299

the default is Chinese titles.
This commit is contained in:
Garfield69 2020-05-19 11:32:14 +12:00
parent a6f197f63f
commit ff4c1f2151
1 changed files with 11 additions and 2 deletions

View File

@ -50,6 +50,10 @@ settings:
type: info
label: "About 2FA code"
default: "Only fill in the <b>2FA code</b> box if you have enabled <b>2FA</b> on the KeepFriends Web Site. Otherwise just leave it empty."
- name: english_title
type: checkbox
label: "Use English titles instead of Chinese ones (when available)."
default: false
- name: sort
type: select
label: Sort requested from site
@ -109,12 +113,13 @@ search:
filters:
- name: querystring
args: cat
title:
title_raw:
selector: a[href^="details.php?id="]
title:
title_raw:
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
# note: final title processing is at the bottom after descrptions is fetched.
details:
selector: a[href^="details.php?id="]
attribute: href
@ -169,4 +174,8 @@ search:
description:
selector: td:nth-child(2)
remove: a, img
title_english:
selector: table.torrentname > tbody > tr > td.embedded
title:
text: "{{ if and .Config.english_title .Result.title_english }}{{ .Result.title_english }}{{ else }}{{ .Result.title_raw }}{{ end }}"
# NexusPHP Standard v1.5 Beta 4 (custom title search)