diff --git a/src/Jackett.Common/Definitions/theshinning-api.yml b/src/Jackett.Common/Definitions/theshinning-api.yml
new file mode 100644
index 000000000..43534f220
--- /dev/null
+++ b/src/Jackett.Common/Definitions/theshinning-api.yml
@@ -0,0 +1,162 @@
+---
+id: theshinning-api
+name: The Shinning (API)
+description: "The Shinning (TsH) is a GERMAN Private Torrent Tracker for MOVIES / TV / GENERAL"
+language: de-DE
+type: private
+encoding: UTF-8
+links:
+ - https://theshinning.me/
+legacylinks:
+ - https://theshinning.org
+ - https://theshinning.org/
+
+caps:
+ categorymappings:
+ - {id: 1, cat: Movies, desc: "Movies"}
+ - {id: 2, cat: TV, desc: "TV"}
+ - {id: 3, cat: Audio, desc: "Music"}
+ - {id: 4, cat: Console, desc: "Game"}
+ - {id: 5, cat: PC, desc: "Application"}
+ - {id: 6, cat: XXX, desc: "XXX"}
+
+ modes:
+ search: [q]
+ tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
+ movie-search: [q, imdbid, tmdbid]
+ music-search: [q]
+
+settings:
+ - name: apikey
+ type: text
+ label: APIKey
+ - name: info_key
+ type: info
+ label: About your API key
+ default: "Find or Generate a new API Token by accessing your The Shinning account My Security page and clicking on the API Token tab."
+ - name: freeleech
+ type: checkbox
+ label: Search freeleech only
+ default: false
+ - name: sort
+ type: select
+ label: Sort requested from site
+ default: created_at
+ options:
+ created_at: created
+ seeders: seeders
+ size: size
+ name: title
+ - name: type
+ type: select
+ label: Order requested from site
+ default: desc
+ options:
+ desc: desc
+ asc: asc
+
+login:
+ path: /api/torrents
+ method: get
+ inputs:
+ api_token: "{{ .Config.apikey }}"
+ error:
+ - selector: a[href*="/login"]
+ message:
+ text: "The API key was not accepted by {{ .Config.sitelink }}."
+
+search:
+ paths:
+ # https://hdinnovations.github.io/UNIT3D-Community-Edition-Docs/api_endpoints.html
+ # https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php
+ - path: "/api/torrents/filter"
+ response:
+ type: json
+
+ inputs:
+ # if we have an id based search, add Season and Episode as query in name for UNIT3D < v6. Else pass S/E Params for UNIT3D >= v6
+ api_token: "{{ .Config.apikey }}"
+ name: "{{ .Keywords }}"
+ $raw: "{{ if .Query.Season }}&seasonNumber={{ .Query.Season }}{{ else }}{{ end }}{{ if .Query.Ep }}&episodeNumber={{ .Query.Ep }}{{ else }}{{ end }}{{ if .Query.TMDBID }}&tmdbId={{ .Query.TMDBID }}{{ else }}{{ end }}{{ if .Query.IMDBIDShort }}&imdbId={{ .Query.IMDBIDShort }}{{ else }}{{ end }}{{ if .Query.TVDBID }}&tvdbId={{ .Query.TVDBID }}{{ else }}{{ end }}{{ range .Categories }}&categories[]={{.}}{{end}}{{ if .Config.freeleech }}&free=1{{ else }}{{ end }}"
+ sortField: "{{ .Config.sort }}"
+ sortDirection: "{{ .Config.type }}"
+ perPage: 100
+ page: 1
+
+ keywordsfilters:
+ - name: re_replace
+ args: ["\\.", " "]
+
+ rows:
+ selector: data
+ attribute: attributes
+ count:
+ selector: meta.total
+
+ fields:
+ category:
+ selector: category_id
+ title:
+ selector: name
+ details:
+ selector: details_link
+ download:
+ selector: download_link
+ infohash:
+ selector: info_hash
+ poster:
+ selector: meta.poster
+ filters:
+ - name: replace
+ args: ["https://via.placeholder.com/90x135", ""]
+ imdbid:
+ selector: imdb_id
+ tmdbid:
+ selector: tmdb_id
+ tvdbid:
+ selector: tvdb_id
+ genre:
+ selector: meta.genres
+ filters:
+ - name: re_replace
+ args: ["(?i)(Science Fiction)", "Science_Fiction"]
+ - name: replace
+ args: [" & ", "_&_"]
+ description:
+ text: "{{ .Result.genre }}"
+ files:
+ selector: num_file
+ seeders:
+ selector: seeders
+ leechers:
+ selector: leechers
+ grabs:
+ selector: times_completed
+ date:
+ # 2021-10-18T00:34:50.000000Z"
+ selector: created_at
+ size:
+ selector: size
+ downloadvolumefactor:
+ # api returns 0%, 25%, 50%, 75%, 100%
+ selector: freeleech
+ case:
+ 0%: 1 # not free
+ 25%: 0.75
+ 50%: 0.5
+ 75%: 0.25
+ 100%: 0 # freeleech
+ "*": 0 # catch errors
+ uploadvolumefactor:
+ # api returns 0=false, 1=true
+ selector: double_upload
+ case:
+ 0: 1 # normal
+ 1: 2 # double
+# global MR is 0.4 but torrents must be seeded for 7 days regardless of ratio
+# minimumratio:
+# text: 0.4
+ minimumseedtime:
+ # 7 day (as seconds = 7 x 24 x 60 x 60)
+ text: 604800
+# json UNIT3D 6.4.1
diff --git a/src/Jackett.Common/Definitions/theshinning.yml b/src/Jackett.Common/Definitions/theshinning.yml
deleted file mode 100644
index 14395e023..000000000
--- a/src/Jackett.Common/Definitions/theshinning.yml
+++ /dev/null
@@ -1,179 +0,0 @@
----
-id: theshinning
-name: The Shinning
-description: "The Shinning (TsH) is a GERMAN Private Torrent Tracker for MOVIES / TV / GENERAL"
-language: de-DE
-type: private
-encoding: UTF-8
-links:
- - https://theshinning.me/
-legacylinks:
- - https://theshinning.org
- - https://theshinning.org/
-
-caps:
- categorymappings:
- - {id: 1, cat: Movies, desc: "Movies"}
- - {id: 2, cat: TV, desc: "Serien"}
- - {id: 3, cat: Audio, desc: "Musik"}
- - {id: 4, cat: Console, desc: "Games"}
- - {id: 5, cat: PC, desc: "Apps"}
- - {id: 6, cat: Other, desc: "Misc"}
- - {id: 7, cat: XXX, desc: "XxX"}
- - {id: 8, cat: Movies, desc: "Kids"}
- - {id: 9, cat: TV/Sport, desc: "Sport"}
- - {id: 10, cat: TV/Documentary, desc: "Doku"}
- - {id: 11, cat: TV/Anime, desc: "Anime"}
-
- modes:
- search: [q]
- tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
- movie-search: [q, imdbid, tmdbid]
- music-search: [q]
-
-settings:
- - name: username
- type: text
- label: Username
- - name: password
- type: password
- label: Password
- - name: freeleech
- type: checkbox
- label: Search freeleech only
- default: false
- - name: sort
- type: select
- label: Sort requested from site
- default: created_at
- options:
- created_at: created
- seeders: seeders
- size: size
- name: title
- - name: type
- type: select
- label: Order requested from site
- default: desc
- options:
- desc: desc
- asc: asc
-
-login:
- path: login
- method: form
- form: form[action$="/login"]
- inputs:
- username: "{{ .Config.username }}"
- password: "{{ .Config.password }}"
- remember: on
- selectorinputs:
- _token:
- selector: input[name="_token"]
- attribute: value
- error:
- - selector: form[action$="/login"] .text-red
-# test:
-# path: /
-# selector: a[href$="/logout"]
-
-search:
- paths:
- - path: filterTorrents
- inputs:
- $raw: "{{ range .Categories }}categories[]={{.}}&{{end}}"
- search: "{{ if .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}" # for dashboard imdbid search
- description: ""
- uploader: ""
- imdb: "{{ .Query.IMDBIDShort }}"
- tvdb: "{{ .Query.TVDBID }}"
- tmdb: "{{ .Query.TMDBID }}"
- mal: ""
- sorting: "{{ .Config.sort }}"
- direction: "{{ .Config.type }}"
- qty: 100
- page: 0
- view: list
- freeleech: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
-
- rows:
- selector: table > tbody > tr
-
- fields:
- category:
- selector: a[href*="/categories/"]
- attribute: href
- filters:
- - name: regexp
- args: "/categories/.*?\\.(\\d+)"
- title:
- selector: a.view-torrent
- download:
- selector: a[href*="/download/"]
- attribute: href
- details:
- selector: a.view-torrent
- attribute: href
- poster:
- selector: div.torrent-poster img
- attribute: src
- filters:
- - name: prepend
- args: "https://images.weserv.nl/?url=" # for display on dashboard
- - name: append
- args: "&w=180&h=270" # for display on dashboard
- - name: replace
- args: ["https://images.weserv.nl/?url=https://theshinning.me/img/nocover.png&w=180&h=270", ""]
- genre:
- selector: td:nth-last-child(10)
- filters:
- - name: replace
- args: ["\n", ""]
- - name: re_replace
- args: ["(?i)(Science Fiction)", "Science_Fiction"]
- - name: validate
- args: "Action, Adventure, Animation, Biography, Comedy, Crime, Documentary, Drama, Family, Fantasy, Game-Show, History, Horror, Music, Musical, Mystery, News, Reality-TV, Romance, Science_Fiction, Sitcom, Sport, Talk-Show, Thriller, War, Western"
- description:
- text: "{{ .Result.genre }}"
- imdbid:
- selector: a[href*="imdb.com/title/tt"]
- attribute: href
- tmdbid:
- selector: a[href*="themoviedb.org/movie/"], a[href*="themoviedb.org/tv/"]
- attribute: href
- size:
- selector: td:nth-last-child(4)
- grabs:
- selector: td:nth-last-child(3)
- seeders:
- selector: td:nth-last-child(2)
- leechers:
- selector: td:nth-last-child(1)
- date:
- # 13.11.2020 19:50:26
- selector: time
- filters:
- - name: append
- args: " +01:00" # CET
- - name: dateparse
- args: "02.01.2006 15:04:05 -07:00"
- downloadvolumefactor:
- case:
- i[class*="fa-id-badge text-orange"]: 0 # 24 Hour FreeLeech From BON Store
- i[class*="fa-trophy text-purple"]: 0 # Special FreeLeech For Certain User Groups
- i[class*="fa-star text-bold"]: 0 # Freeleech From Token
- i[class*="fa-coins text-bold"]: 0 # Freeleech From Token
- i[class*="fa-globe text-blue"]: 0 # Global Freeleech
- i[class*="fa-star text-gold"]: 0 # Freeleech
- i[class*="fa-certificate text-pink"]: 0 # Featured Torrent
- "*": 1
- uploadvolumefactor:
- case:
- i[class*="fa-gem text-green"]: 2 # Single Torrent Double Upload
- i[class*="fa-globe text-green"]: 2 # Global Double Upload
- i[class*="fa-certificate text-pink"]: 2 # Featured Torrent
- "*": 1
- minimumseedtime:
- # 60 hours (as seconds = 60 x 60 x 60)
- text: 216000
-# UNIT3D 1.9.4.5
diff --git a/src/Jackett.Updater/Program.cs b/src/Jackett.Updater/Program.cs
index 899d1ce7d..9136d7601 100644
--- a/src/Jackett.Updater/Program.cs
+++ b/src/Jackett.Updater/Program.cs
@@ -532,6 +532,7 @@ namespace Jackett.Updater
"Definitions/the-madhouse.yml",
"Definitions/themoviecave.yml",
"Definitions/theresurrection.yml",
+ "Definitions/theshinning.yml", // switch to *-API #13751
"Definitions/thespit.yml",
"Definitions/thetorrents.yml",
"Definitions/theunknown.yml", // became 3evils #9678