Einige Fixes

This commit is contained in:
Akamaru 2016-03-27 16:03:31 +02:00
parent a249555a5d
commit fda6651444
7 changed files with 18 additions and 14 deletions

4
.gitignore vendored
View File

@ -16,4 +16,6 @@ plugins/wiiu.lua
plugins/plex_test.lua plugins/plex_test.lua
plugins/gravatar.lua plugins/gravatar.lua
pictures/3uhrmorgens.jpg pictures/3uhrmorgens.jpg
plugins/figuya.lua plugins/figuya.lua
plugins/plex_info.lua
plugins/plex_last.lua

View File

@ -560,6 +560,7 @@ function unescape(str)
str = string.gsub(str, "…", "") str = string.gsub(str, "…", "")
str = string.gsub(str, "‹", "") str = string.gsub(str, "‹", "")
str = string.gsub(str, "€", "") str = string.gsub(str, "€", "")
str = string.gsub(str, "♪", "")
-- Ä Ö Ü -- Ä Ö Ü
str = string.gsub(str, "ä", "ä") str = string.gsub(str, "ä", "ä")

0
launch.sh Executable file → Normal file
View File

View File

@ -48,7 +48,7 @@ local data = json:decode(table.concat(response_body))._children[1]
end end
if data.grandparentTitle then if data.grandparentTitle then
from = ' (aus '..data.grandparentTitle..' ['..season..episode..']'..') ' from = ' (aus '..data.grandparentTitle..' ['..string.gsub(season..episode, 'S0E', 'SP')..']'..') '
else else
from = '' from = ''
end end
@ -98,7 +98,7 @@ local data = json:decode(table.concat(response_body))._children[1]
end end
if data.summary then if data.summary then
desc = '\n\n'..string.gsub(data.summary, 'EditBackgroundNo(.*)', '') desc = '\n\n'..string.gsub(unescape(data.summary), 'EditBackgroundNo(.*)', '')
else else
desc = '' desc = ''
end end

View File

@ -8,12 +8,13 @@ end
function run(msg, matches) function run(msg, matches)
local pics = { local pics = {
-- add more below! -- add more below!
["test"] = "../USB/test/", ["test"] = "../Bilder/Mikubot/sfw/test/",
["anime"] = "../USB/sfw/anime/", ["anime"] = "../Bilder/Mikubot/sfw/anime/",
["mlp"] = "../USB/sfw/mlp/", ["mlp"] = "../Bilder/Mikubot/sfw/mlp/",
["faktillon"] = "../USB/sfw/faktillon/", ["faktillon"] = "../Bilder/Mikubot/sfw/faktillon/",
["faktastisch"] = "../USB/sfw/faktastisch/", ["faktastisch"] = "../Bilder/Mikubot/sfw/faktastisch/",
["gamefakt"] = "../USB/sfw/gamefakt/" ["gamefakt"] = "../Bilder/Mikubot/sfw/gamefakt/",
["faktglaublich"] = "../Bilder/Mikubot/sfw/faktglaublich/"
} }
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
@ -30,13 +31,13 @@ function run(msg, matches)
return "Fehler: " .. img return "Fehler: " .. img
end end
else else
return '"'..imgtype..'" gibt es nicht.\nEs gibt:\nanime\nmlp\nfaktillon\nfaktastisch\ngamefakt' return '"'..imgtype..'" gibt es nicht.\nEs gibt:\nanime\nmlp\nfaktillon\nfaktastisch\ngamefakt\nfaktglaublich'
end end
end end
return { return {
description = "Sendet ein zufälliges Bild", description = "Sendet ein zufälliges Bild",
usage = {"/rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt"}, usage = {"/rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt","faktglaublich"},
patterns = {"^/rpic (.*)$"}, patterns = {"^/rpic (.*)$"},
run = run run = run
} }

View File

@ -8,8 +8,8 @@ end
function run(msg, matches) function run(msg, matches)
local pics = { local pics = {
-- add more below! -- add more below!
["/nsfw"] = "/home/pi/USB/nsfw/", ["/nsfw"] = "../Pictures/Mikubot/nsfw/",
["/nsfw gif"] = "/home/pi/USB/nsfw/gifs/" ["/nsfw gif"] = "../Pictures/Mikubot/nsfw/gifs/"
} }
local receiver = get_receiver(msg) local receiver = get_receiver(msg)

View File

@ -71,7 +71,7 @@ function run(msg, matches)
return { return {
description = "Postet den URL-Titel", description = "Postet den URL-Titel",
usage = {""}, usage = {""},
patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$"}, patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!%%]+)$"},
run = run run = run
} }
end end