From 2334a4063836d3ddd79238d3633dc5a17662e556 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Sun, 24 Jul 2016 17:24:16 +0200 Subject: [PATCH] =?UTF-8?q?plex.lua:=20l=C3=A4nge=20der=20Beschreibung=20g?= =?UTF-8?q?ek=C3=BCrzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/plex.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/plex.lua b/plugins/plex.lua index d7d8f2c..9de2ac2 100644 --- a/plugins/plex.lua +++ b/plugins/plex.lua @@ -12,6 +12,8 @@ local makeOurDate = function(dateString) end end +local DESC_LENTH = 400 + local function get_plex(query) local token = cred_data.plex_token local baseurl = 'http://kyouko.local:32400' --replace it with yours @@ -98,7 +100,7 @@ local data = json:decode(table.concat(response_body))._children[1] end if data.summary then - desc = '\n\n'..string.gsub(unescape(data.summary), 'EditBackgroundNo(.*)', '') + desc = '\n\n'..string.sub(unescape(data.summary:gsub("%b<>", "")), 1, DESC_LENTH)..'...' else desc = '' end