1
0
mirror of https://github.com/Tautulli/Tautulli.git synced 2025-03-12 04:35:40 -07:00

Fix styling on activity window for music tracks.

This commit is contained in:
Tim 2015-07-09 21:43:17 +02:00
parent e83c9321d4
commit 8a93b359c6
5 changed files with 42 additions and 24 deletions

@ -6648,10 +6648,13 @@ button.close {
z-index: 1;
}
.dashboard-activity-poster-face {
height: 152px;
height: 141px;
width: 250px;
position: relative;
top: 0px;
background-color: rgba(255,255,255,.03);
margin-bottom: 11px;
text-align: center;
}
.dashboard-activity-poster-face img {
bottom: 0;
@ -6682,8 +6685,14 @@ button.close {
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
height: 141px;
width: 250px;
height: 140px;
min-width: 140px;
}
.dashboard-activity-poster-music-bg {
position:absolute;
width:100%;
height:100%;
opacity: 0.7;
}
.dashboard-activity-metadata-user {
text-overflow: ellipsis;

@ -58,7 +58,10 @@ DOCUMENTATION :: END
</div>
% else:
<div class="dashboard-activity-poster-face">
<img src="pms_image_proxy?img=${a['thumb']}&width=300&height=169"/>
% if a['type'] == 'track':
<div class="dashboard-activity-poster-music-bg" style="background-image: url('pms_image_proxy?img=${a['thumb']}&width=300&height=300');"></div>
% endif
<img src="pms_image_proxy?img=${a['thumb']}&width=300&height=169&fallback=cover"/>
</div>
% endif
<div class='dashboard-activity-metadata-wrapper'>

Binary file not shown.

After

(image error) Size: 12 KiB

@ -37,4 +37,5 @@ notify_strings[NOTIFY_STARTED] = "Playback started"
notify_strings[NOTIFY_STOPPED] = "Playback stopped"
DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png"
DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"
DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"
DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png"

@ -551,25 +551,30 @@ class WebInterface(object):
@cherrypy.expose
def pms_image_proxy(self, img='', width='0', height='0', fallback=None, **kwargs):
if img != '':
try:
pms_connect = pmsconnect.PmsConnect()
result = pms_connect.get_image(img, width, height)
cherrypy.response.headers['Content-type'] = result[1]
return result[0]
except:
logger.warn('Image proxy queried but errors occured.')
if fallback == 'poster':
logger.info('Trying fallback image...')
try:
fallback_image = open(self.interface_dir + common.DEFAULT_POSTER_THUMB, 'rb')
cherrypy.response.headers['Content-type'] = 'image/png'
return fallback_image
except IOError, e:
logger.error('Unable to read fallback image. %s' % e)
return None
else:
logger.warn('Image proxy queried but no parameters received.')
try:
pms_connect = pmsconnect.PmsConnect()
result = pms_connect.get_image(img, width, height)
cherrypy.response.headers['Content-type'] = result[1]
return result[0]
except:
logger.warn('Image proxy queried but errors occured.')
if fallback == 'poster':
logger.info('Trying fallback image...')
try:
fallback_image = open(self.interface_dir + common.DEFAULT_POSTER_THUMB, 'rb')
cherrypy.response.headers['Content-type'] = 'image/png'
return fallback_image
except IOError, e:
logger.error('Unable to read fallback image. %s' % e)
elif fallback == 'cover':
logger.info('Trying fallback image...')
try:
fallback_image = open(self.interface_dir + common.DEFAULT_COVER_THUMB, 'rb')
cherrypy.response.headers['Content-type'] = 'image/png'
return fallback_image
except IOError, e:
logger.error('Unable to read fallback image. %s' % e)
return None
@cherrypy.expose