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