mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 04:49:36 -07:00
Fix styling and sorting for for recently added items.
This commit is contained in:
parent
9eca41d56f
commit
253a1efb3a
3 changed files with 5 additions and 5 deletions
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
function recentlyAdded() {
|
function recentlyAdded() {
|
||||||
var widthVal = $('body').find(".container-fluid").width();
|
var widthVal = $('body').find(".container-fluid").width();
|
||||||
var tmp = widthVal / 182;
|
var tmp = (widthVal-20) / 182;
|
||||||
|
|
||||||
if (tmp > 0) {
|
if (tmp > 0) {
|
||||||
containerSize = parseInt(tmp);
|
containerSize = parseInt(tmp);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
% elif item['type'] == 'movie':
|
% elif item['type'] == 'movie':
|
||||||
<h3>${item['title']} (${item['year']})</h3>
|
<h3>${item['title']} (${item['year']})</h3>
|
||||||
% endif
|
% endif
|
||||||
<h4><span id="addedAt-${item['ratingKey']}">${item['addedAt']}</span></h4>
|
<div class="muted" id="addedAt-${item['ratingKey']}">${item['addedAt']}</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -220,7 +220,7 @@ class PmsConnect(object):
|
||||||
recent_items = {}
|
recent_items = {}
|
||||||
recents_list.append(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
|
return output
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -562,9 +562,9 @@ class PmsConnect(object):
|
||||||
try:
|
try:
|
||||||
http_handler = HTTPConnection(self.host, self.port, timeout=10)
|
http_handler = HTTPConnection(self.host, self.port, timeout=10)
|
||||||
if width != '0' and height != '0':
|
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:
|
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)
|
http_handler.request("GET", image_path + '&X-Plex-Token=' + self.token)
|
||||||
response = http_handler.getresponse()
|
response = http_handler.getresponse()
|
||||||
request_status = response.status
|
request_status = response.status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue