mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Another update to recently added and recently watched.
Recently added albums now include artist name. Recently watched episodes now include show name.
This commit is contained in:
parent
22cc06dec3
commit
6cb1c057cf
4 changed files with 22 additions and 14 deletions
|
@ -264,6 +264,9 @@ fieldset[disabled] .btn-bright.active {
|
|||
.modal-body i {
|
||||
color: #F9AA03;
|
||||
}
|
||||
.modal-body i.fa {
|
||||
color: #fff;
|
||||
}
|
||||
.modal-body strong {
|
||||
color: #F9AA03;
|
||||
}
|
||||
|
@ -641,13 +644,14 @@ input[type="color"],
|
|||
font-size: 13px;
|
||||
margin: 0;
|
||||
line-height: 15px;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
width: 153px;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
}
|
||||
.dashboard-recent-media-metacontainer text-muted {
|
||||
.dashboard-recent-media-metacontainer .text-muted {
|
||||
padding-top: 5px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
@ -1151,7 +1155,7 @@ input[type="color"],
|
|||
position: relative;
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
width: 140px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ DOCUMENTATION :: END
|
|||
<div class="cover-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||
</div>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
<h3>${item['parent_title']}</h3>
|
||||
<h3>${item['title']}</h3>
|
||||
<div class="text-muted" id="added_at-${item['rating_key']}">${item['added_at']}</div>
|
||||
</div>
|
||||
|
|
|
@ -18,6 +18,7 @@ time Returns the last watched time of the media.
|
|||
title Returns the name of the movie or episode.
|
||||
|
||||
== Only if 'type' is 'episode ==
|
||||
parent_title Returns the name of the TV Show a season belongs too.
|
||||
parent_index Returns the season number.
|
||||
index Returns the episode number.
|
||||
|
||||
|
@ -39,8 +40,9 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
% if item['type'] == 'episode':
|
||||
<h3>${item['parent_title']}</h3>
|
||||
<h3>${item['title']}</h3>
|
||||
<h3>(Season ${item['parentIndex']}, Episode ${item['index']})</h3>
|
||||
<h3>(Season ${item['parent_index']}, Episode ${item['index']})</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3>${item['title']}</h3>
|
||||
<h3>(${item['year']})</h3>
|
||||
|
|
|
@ -381,21 +381,21 @@ class DataFactory(object):
|
|||
try:
|
||||
if user_id:
|
||||
query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, ' \
|
||||
'thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'grandparent_title, thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'FROM session_history_metadata ' \
|
||||
'JOIN session_history ON session_history_metadata.id = session_history.id ' \
|
||||
'WHERE user_id = ? AND session_history.media_type != "track" ORDER BY started DESC LIMIT ?'
|
||||
result = monitor_db.select(query, args=[user_id, limit])
|
||||
elif user:
|
||||
query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, ' \
|
||||
'thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'grandparent_title, thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'FROM session_history_metadata ' \
|
||||
'JOIN session_history ON session_history_metadata.id = session_history.id ' \
|
||||
'WHERE user = ? AND session_history.media_type != "track" ORDER BY started DESC LIMIT ?'
|
||||
result = monitor_db.select(query, args=[user, limit])
|
||||
else:
|
||||
query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, ' \
|
||||
'thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'grandparent_title, thumb, parent_thumb, media_index, parent_media_index, year, started, user ' \
|
||||
'FROM session_history_metadata WHERE session_history.media_type != "track"' \
|
||||
'JOIN session_history ON session_history_metadata.id = session_history.id ' \
|
||||
'ORDER BY started DESC LIMIT ?'
|
||||
|
@ -406,20 +406,21 @@ class DataFactory(object):
|
|||
|
||||
for row in result:
|
||||
if row[1] == 'episode':
|
||||
thumb = row[5]
|
||||
thumb = row[6]
|
||||
else:
|
||||
thumb = row[4]
|
||||
thumb = row[5]
|
||||
|
||||
recent_output = {'row_id': row[0],
|
||||
'type': row[1],
|
||||
'rating_key': row[2],
|
||||
'title': row[3],
|
||||
'parent_title': row[4],
|
||||
'thumb': thumb,
|
||||
'index': row[6],
|
||||
'parentIndex': row[7],
|
||||
'year': row[8],
|
||||
'time': row[9],
|
||||
'user': row[10]
|
||||
'index': row[7],
|
||||
'parent_index': row[8],
|
||||
'year': row[9],
|
||||
'time': row[10],
|
||||
'user': row[11]
|
||||
}
|
||||
recently_watched.append(recent_output)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue