plex.lua: länge der Beschreibung gekürzt
This commit is contained in:
parent
8bd0a5bc56
commit
2334a40638
@ -12,6 +12,8 @@ local makeOurDate = function(dateString)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local DESC_LENTH = 400
|
||||||
|
|
||||||
local function get_plex(query)
|
local function get_plex(query)
|
||||||
local token = cred_data.plex_token
|
local token = cred_data.plex_token
|
||||||
local baseurl = 'http://kyouko.local:32400' --replace it with yours
|
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
|
end
|
||||||
|
|
||||||
if data.summary then
|
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
|
else
|
||||||
desc = ''
|
desc = ''
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user