Accommodate for music in recently added.

This commit is contained in:
Tim 2015-07-08 00:13:20 +02:00
parent a5d6b8ec0f
commit 69c8441c1c
3 changed files with 66 additions and 12 deletions

View file

@ -6459,6 +6459,9 @@ button.close {
}
.poster {
float: left;
min-height: 232px;
min-width: 155px;
position: relative;
}
.poster-face img{
bottom: 0;
@ -6491,6 +6494,9 @@ button.close {
backface-visibility: hidden;
height: 225px;
width: 153px;
position: absolute;
bottom: 5px;
left: 0;
border: 1px solid rgba(128, 128, 128, 0.3);
}
.poster-face img:hover {
@ -6498,6 +6504,47 @@ button.close {
-moz-box-shadow: 0 0 0 2px #e9a049;
box-shadow: 0 0 0 2px #e9a049;
}
.cover-face img{
bottom: 0;
overflow: hidden;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.75);
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.75);
box-shadow: 0 0 10px rgba(0,0,0,0.75);
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-ms-perspective: 1000;
-o-perspective: 1000;
perspective: 1000;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
height: 153px;
width: 153px;
border: 1px solid rgba(128, 128, 128, 0.3);
position: absolute;
bottom: 5px;
left: 0;
}
.cover-face img:hover {
webkit-box-shadow: 0 0 0 2px #e9a049;
-moz-box-shadow: 0 0 0 2px #e9a049;
box-shadow: 0 0 0 2px #e9a049;
}
.users-poster-face img {
bottom: 0;
overflow: hidden;

View file

@ -29,18 +29,28 @@ DOCUMENTATION :: END
<div class="dashboard-recent-media-instance">
<li>
<div class="poster">
% if item['type'] == 'season' or item['type'] == 'movie':
<div class="poster-face">
<a href="info?rating_key=${item['rating_key']}">
% if item['thumb'] != '':
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
% else:
<img src="interfaces/default/images/poster.png" class="poster-face">
<img src="interfaces/default/images/poster.png" class="poster-face" width="153" height="225">
% endif
</a>
</div>
% elif item['type'] == 'album':
<div class="cover-face">
% if item['thumb'] != '':
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=153" class="cover-face">
% else:
<img src="interfaces/default/images/poster.png" class="cover-face" width="153" height="153">
% endif
</div>
% endif
</div>
<div class="dashboard-recent-media-metacontainer">
% if item['type'] == 'season':
% if item['type'] == 'season' or item['type'] == 'album':
<h3>${item['title']}</h3>
% elif item['type'] == 'movie':
<h3>${item['title']} (${item['year']})</h3>

View file

@ -205,17 +205,14 @@ class PmsConnect(object):
recents_main = a.getElementsByTagName('Directory')
for item in recents_main:
recent_type = helpers.get_xml_attr(item, 'type')
recent_items = {'type': recent_type,
'rating_key': helpers.get_xml_attr(item, 'ratingKey'),
'title': helpers.get_xml_attr(item, 'title'),
'thumb': helpers.get_xml_attr(item, 'thumb'),
'added_at': helpers.get_xml_attr(item, 'addedAt')
}
recents_list.append(recent_items)
if recent_type == 'season':
recent_items = {'type': recent_type,
'rating_key': helpers.get_xml_attr(item, 'ratingKey'),
'title': helpers.get_xml_attr(item, 'title'),
'thumb': helpers.get_xml_attr(item, 'thumb'),
'added_at': helpers.get_xml_attr(item, 'addedAt')
}
recents_list.append(recent_items)
else:
pass
if a.getElementsByTagName('Video'):
recents_main = a.getElementsByTagName('Video')
for item in recents_main: