From 33ef0ec3c04e9916abd525742192283672e45c64 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Tue, 1 Mar 2016 13:04:39 +0100 Subject: [PATCH] =?UTF-8?q?Episodenanzahl=20und=20Spiell=C3=A4nge=20zum=20?= =?UTF-8?q?Plex=20Plugin=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/plex.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/plex.lua b/plugins/plex.lua index dce7a32..c3cb15c 100644 --- a/plugins/plex.lua +++ b/plugins/plex.lua @@ -61,16 +61,30 @@ local data = json:decode(table.concat(response_body))._children[1] if data.originallyAvailableAt then date = '\nAusstrahlung: '..makeOurDate(data.originallyAvailableAt) + elseif data.year then + date = '\nAusstrahlung: '..data.year else date = '' end + if data.leafCount then + episodes = ' ('..data.leafCount..' Episoden) ' + else + episodes = '' + end + if data.contentRating then fsk = '\nAltersfreigabe: '..gerRating(data.contentRating) else fsk = '' end + if data.duration then + duration = '\nLänge: '..formatMilliseconds(data.duration) + else + duration = '' + end + if data.rating then rating = '\nBewertung: '..data.rating else @@ -87,7 +101,7 @@ local data = json:decode(table.concat(response_body))._children[1] pic = baseurl..data.thumb end - local text = title..from..origtitle..studio..date..fsk..rating..desc..'\n' + local text = title..from..origtitle..studio..date..episodes..fsk..duration..rating..desc..'\n' if data.thumb then