diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index cc275130..c718e476 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -73,7 +73,7 @@ function recentlyAdded() { var widthVal = $('body').find(".container-fluid").width(); - var tmp = widthVal / 182; + var tmp = (widthVal-20) / 182; if (tmp > 0) { containerSize = parseInt(tmp); diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html index 41ecde9a..d82263e2 100644 --- a/data/interfaces/default/recently_added.html +++ b/data/interfaces/default/recently_added.html @@ -21,7 +21,7 @@ % elif item['type'] == 'movie':

${item['title']} (${item['year']})

% endif -

${item['addedAt']}

+
${item['addedAt']}
diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 97c730ba..93594109 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -220,7 +220,7 @@ class PmsConnect(object): recent_items = {} recents_list.append(recent_items) - output = {'recently_added': recents_list} + output = {'recently_added': sorted(recents_list, key=lambda k: k['addedAt'], reverse=True)} return output """ @@ -562,9 +562,9 @@ class PmsConnect(object): try: http_handler = HTTPConnection(self.host, self.port, timeout=10) if width != '0' and height != '0': - image_path = '/photo/:/transcode?url=http://127.0.0.1:' + self.port + img + '&width=' + width + '&height=' + height + image_path = '/photo/:/transcode?url=http://127.0.0.1:32400' + img + '&width=' + width + '&height=' + height else: - image_path = '/photo/:/transcode?url=http://127.0.0.1:' + self.port + img + image_path = '/photo/:/transcode?url=http://127.0.0.1:32400' + img http_handler.request("GET", image_path + '&X-Plex-Token=' + self.token) response = http_handler.getresponse() request_status = response.status