FSK "Umrechner"
This commit is contained in:
parent
c557d11da2
commit
1924eddeaa
@ -579,6 +579,21 @@ function unescape(str)
|
|||||||
return str
|
return str
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function gerRating(str)
|
||||||
|
str = string.gsub(str, "de/0", "FSK0")
|
||||||
|
str = string.gsub(str, "G %- All Ages", "FSK0")
|
||||||
|
str = string.gsub(str, "de/6", "FSK6")
|
||||||
|
str = string.gsub(str, "PG %- Children", "FSK6")
|
||||||
|
str = string.gsub(str, "de/12", "FSK12")
|
||||||
|
str = string.gsub(str, "de/16", "FSK16")
|
||||||
|
str = string.gsub(str, "PG%-13 %- Teens 13 or older", "FSK16")
|
||||||
|
str = string.gsub(str, "de/18", "FSK18")
|
||||||
|
str = string.gsub(str, "R %- 17%+ %(violence & profanity%)", "FSK18")
|
||||||
|
str = string.gsub(str, "R%+ %- Mild Nudity", "FSK18")
|
||||||
|
str = string.gsub(str, "Rx %- Hentai", "FSK18")
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
|
||||||
-- See http://stackoverflow.com/a/14899740
|
-- See http://stackoverflow.com/a/14899740
|
||||||
function unescape_html(str)
|
function unescape_html(str)
|
||||||
local map = {
|
local map = {
|
||||||
|
@ -68,7 +68,7 @@ local data = json:decode(table.concat(response_body))._children[1]
|
|||||||
end
|
end
|
||||||
|
|
||||||
if data.contentRating then
|
if data.contentRating then
|
||||||
fsk = '\nAltersfreigabe: '..data.contentRating
|
fsk = '\nAltersfreigabe: '..gerRating(data.contentRating)
|
||||||
else
|
else
|
||||||
fsk = ''
|
fsk = ''
|
||||||
end
|
end
|
||||||
@ -111,9 +111,9 @@ local function run(msg, matches)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description = "",
|
description = "Suche für Plex Media Server",
|
||||||
usage = "",
|
usage = "/plex [BEGRIFF]",
|
||||||
patterns = {"^/plex (.*)$"},
|
patterns = {"^/[Pp][Ll][Ee][Xx] (.*)$"},
|
||||||
run = run
|
run = run
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user