magnetdl: convert to categorymappings

code tidy
This commit is contained in:
Garfield69 2020-11-03 13:58:05 +13:00
parent 333d22d13d
commit 564f9cb65c
1 changed files with 13 additions and 13 deletions

View File

@ -23,14 +23,14 @@ legacylinks:
- https://magnetdl.unblockit.top/
caps:
categories:
TV: TV
Movie: Movies
Music: Audio
E-Book: Books/EBook
Game: PC/Games
Software: PC
Other: Other
categorymappings:
- {id: TV, cat: TV, desc: TV}
- {id: Movie, cat: Movies, desc: Movies}
- {id: Music, cat: Audio, desc: Music}
- {id: E-Book, cat: Books/EBook, desc: Ebooks}
- {id: Game, cat: PC/Games, desc: Games}
- {id: Software, cat: PC, desc: Software}
- {id: Other, cat: Other, desc: Other}
modes:
search: [q]
@ -68,21 +68,21 @@ search:
paths:
# return results for 'of' if there are no search parms supplied (for use with the TEST button)
# http://www.magnetdl.com/m/midnight-texas-s01e10/
- path: "{{ if .Keywords }}{{ re_replace .Keywords \"(.).*\" \"$1\" }}/{{ .Keywords }}/{{else}}2/{{ .Today.Year }}/{{end}}{{ .Config.sort }}/{{ .Config.type }}/"
- path: "{{ if .Keywords }}{{ re_replace .Keywords \"(.).*\" \"$1\" }}/{{ .Keywords }}/{{else}}2/{{ .Today.Year }}/{{end}}{{ .Config.sort }}/{{ .Config.type }}/2/"
- path: "{{ if .Keywords }}{{ re_replace .Keywords \"(.).*\" \"$1\" }}/{{ .Keywords }}/{{ else }}2/{{ .Today.Year }}/{{ end }}{{ .Config.sort }}/{{ .Config.type }}/"
- path: "{{ if .Keywords }}{{ re_replace .Keywords \"(.).*\" \"$1\" }}/{{ .Keywords }}/{{ else }}2/{{ .Today.Year }}/{{ end }}{{ .Config.sort }}/{{ .Config.type }}/2/"
rows:
selector: tr:has(td.m)
fields:
title:
selector: td.n a
attribute: title
category:
text: Other
category|noappend:
optional: true
selector: td[class^="t"]
title:
selector: td.n a
attribute: title
details:
selector: td.n a
attribute: href