diff --git a/.gitignore b/.gitignore index e8c654d..df9a02c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ plugins/wiiu.lua plugins/plex_test.lua plugins/gravatar.lua pictures/3uhrmorgens.jpg -plugins/figuya.lua \ No newline at end of file +plugins/figuya.lua +plugins/plex_info.lua +plugins/plex_last.lua \ No newline at end of file diff --git a/bot/utils.lua b/bot/utils.lua index 6defa3f..fbcc936 100644 --- a/bot/utils.lua +++ b/bot/utils.lua @@ -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, "ä", "ä") diff --git a/launch.sh b/launch.sh old mode 100755 new mode 100644 diff --git a/plugins/plex.lua b/plugins/plex.lua index e6dbf04..7d6f3f1 100644 --- a/plugins/plex.lua +++ b/plugins/plex.lua @@ -48,7 +48,7 @@ local data = json:decode(table.concat(response_body))._children[1] end if data.grandparentTitle then - from = ' (aus '..data.grandparentTitle..' ['..season..episode..']'..') ' + from = ' (aus '..data.grandparentTitle..' ['..string.gsub(season..episode, 'S0E', 'SP')..']'..') ' else from = '' end @@ -98,7 +98,7 @@ local data = json:decode(table.concat(response_body))._children[1] end if data.summary then - desc = '\n\n'..string.gsub(data.summary, 'EditBackgroundNo(.*)', '') + desc = '\n\n'..string.gsub(unescape(data.summary), 'EditBackgroundNo(.*)', '') else desc = '' end diff --git a/plugins/random_pic.lua b/plugins/random_pic.lua index fcd2868..1adb63a 100644 --- a/plugins/random_pic.lua +++ b/plugins/random_pic.lua @@ -8,12 +8,13 @@ end function run(msg, matches) local pics = { -- add more below! - ["test"] = "../USB/test/", - ["anime"] = "../USB/sfw/anime/", - ["mlp"] = "../USB/sfw/mlp/", - ["faktillon"] = "../USB/sfw/faktillon/", - ["faktastisch"] = "../USB/sfw/faktastisch/", - ["gamefakt"] = "../USB/sfw/gamefakt/" + ["test"] = "../Bilder/Mikubot/sfw/test/", + ["anime"] = "../Bilder/Mikubot/sfw/anime/", + ["mlp"] = "../Bilder/Mikubot/sfw/mlp/", + ["faktillon"] = "../Bilder/Mikubot/sfw/faktillon/", + ["faktastisch"] = "../Bilder/Mikubot/sfw/faktastisch/", + ["gamefakt"] = "../Bilder/Mikubot/sfw/gamefakt/", + ["faktglaublich"] = "../Bilder/Mikubot/sfw/faktglaublich/" } local receiver = get_receiver(msg) @@ -30,13 +31,13 @@ function run(msg, matches) return "Fehler: " .. img end 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 return { 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 (.*)$"}, run = run } diff --git a/plugins/random_pic_nsfw.lua b/plugins/random_pic_nsfw.lua index d96ff48..aa9e36b 100644 --- a/plugins/random_pic_nsfw.lua +++ b/plugins/random_pic_nsfw.lua @@ -8,8 +8,8 @@ end function run(msg, matches) local pics = { -- add more below! - ["/nsfw"] = "/home/pi/USB/nsfw/", - ["/nsfw gif"] = "/home/pi/USB/nsfw/gifs/" + ["/nsfw"] = "../Pictures/Mikubot/nsfw/", + ["/nsfw gif"] = "../Pictures/Mikubot/nsfw/gifs/" } local receiver = get_receiver(msg) diff --git a/plugins/url_title.lua b/plugins/url_title.lua index 7c34233..19718be 100644 --- a/plugins/url_title.lua +++ b/plugins/url_title.lua @@ -71,7 +71,7 @@ function run(msg, matches) return { description = "Postet den URL-Titel", usage = {""}, - patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$"}, + patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!%%]+)$"}, run = run } end \ No newline at end of file