plex.lua: Kein ... wenn Beschreibung weniger als 400 Zeichen hat

This commit is contained in:
Akamaru 2016-08-18 13:16:40 +02:00
parent cbbf64ea9e
commit cdf7b7f34e

View File

@ -110,7 +110,11 @@ function plex:get_plex(query)
end
if data.summary then
if string.len(data.summary) > 400 then
desc = '\n\n<i>'..string.sub(unescape(data.summary:gsub("%b<>", "")), 1, DESC_LENTH)..'...</i>'
else
desc = '\n\n<i>'..unescape(data.summary)..'</i>'
end
else
desc = ''
end
@ -121,7 +125,7 @@ function plex:get_plex(query)
pic = nil
end
local text = title..tag..from..origtitle..studio..date..episodes..fsk..duration..rating..desc..'\n'
local text = title..tag..from..origtitle..studio..date..episodes..fsk..duration..rating..desc
return text, pic
end