diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 05e822ad..ff44dbea 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -778,36 +778,88 @@ a .dashboard-activity-metadata-user-thumb:hover { font-weight: bold; color: #F9AA03; } -/*.dashboard-activity-instance-overlay { - position: relative; - top: -12px; - text-align: left; - height: 53px; - width: 250px; - border-radius: 0 0 3px 3px; -}*/ .dashboard-recent-media-row { width: 100%; margin:0 auto; text-align: center; + position: relative; + z-index: 0; } .dashboard-recent-media { width: 100%; margin: auto; list-style: none; } -.dashboard-recent-media-instance { -} .dashboard-recent-media li { - margin-right: 27px; + float: left; + position: relative; + left: 0px; + margin-right: 25px; + margin-bottom: 25px; +} +.dashboard-recent-media-poster { position: relative; float: left; - min-height: 340px; +} +.dashboard-recent-media-cover { + position: relative; + margin-top: 75px; + float: left; +} +a:hover .dashboard-recent-media-poster, +a:hover .dashboard-recent-media-cover { + webkit-box-shadow: inset 0 0 0 2px #e9a049; + -moz-box-shadow: inset 0 0 0 2px #e9a049; + box-shadow: inset 0 0 0 2px #e9a049; +} +.dashboard-recent-media-poster-face { + background-position: center; + background-size: cover; + height: 225px; + width: 150px; + position: relative; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + z-index: -2; +} +.dashboard-recent-media-cover-face { + background-position: center; + background-size: cover; + height: 150px; + width: 150px; + position: relative; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + z-index: -2; +} +.dashboard-recent-media-overlay { + position: absolute; + left: 0; + right: 0; + bottom: 0; + text-align: left; + background: -moz-linear-gradient(top, rgba(0,0,0,0) 30%, rgba(0,0,0,1) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); + background: -o-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); + background: -ms-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); + background: linear-gradient(to bottom, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); + height: 100%; + z-index: -1; +} +.dashboard-recent-media-overlay-text { + color: #aaa; + font-size: 12px; + float: left; + position: absolute; + left: 8px; + bottom: 5px; } .dashboard-recent-media-metacontainer { width: 150px; font-size: 13px; - margin-bottom: 20px; clear: both; } .dashboard-recent-media-metacontainer h3 { @@ -825,6 +877,9 @@ a .dashboard-activity-metadata-user-thumb:hover { text-align: left; clear: both; } +.dashboard-recent-media-metacontainer h3.text-muted { + color: #777; +} .dashboard-recent-media-metacontainer .text-muted { padding: 5px 3px 0 3px; text-overflow: ellipsis; diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html index ee10258d..86736961 100644 --- a/data/interfaces/default/recently_added.html +++ b/data/interfaces/default/recently_added.html @@ -31,37 +31,48 @@ DOCUMENTATION :: END
  • % if item['type'] == 'season' or item['type'] == 'movie': -
    -
    +
    +
    +
    +
    + +
    +
    +
    % if item['type'] == 'season':

    ${item['parent_title']}

    -

    (${item['title']})

    +

    ${item['title']}

    % elif item['type'] == 'movie':

    ${item['title']}

    -

    (${item['year']})

    +

    ${item['year']}

    % endif -
    ${item['added_at']}
    % elif item['type'] == 'album': -
  • - % endfor diff --git a/data/interfaces/default/user_recently_watched.html b/data/interfaces/default/user_recently_watched.html index 2cf7b57c..b87cae83 100644 --- a/data/interfaces/default/user_recently_watched.html +++ b/data/interfaces/default/user_recently_watched.html @@ -32,29 +32,54 @@ DOCUMENTATION :: END
    +
    + % if item['type'] == 'episode': +

    ${item['grandparent_title']}

    +

    ${item['title']}

    +

    S${item['parent_index']} · E${item['index']}

    + % elif item['type'] == 'movie': +

    ${item['title']}

    +

    ${item['year']}

    + % endif +
    +
    +
    + + % elif item['type'] == 'track': + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    ${item['grandparent_title']}

    +

    ${item['title']}

    +

    ${item['parent_title']}

    +
    +
    + % endif + % endfor diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index df6d3686..7b6a99bc 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -524,23 +524,23 @@ class DataFactory(object): try: if user_id: - query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, ' \ + query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, parent_title, ' \ 'grandparent_title, thumb, parent_thumb, grandparent_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 ?' + 'WHERE user_id = ? 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, ' \ + query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, parent_title, ' \ 'grandparent_title, thumb, parent_thumb, grandparent_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 ?' + 'WHERE user = ? 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, ' \ + query = 'SELECT session_history.id, session_history.media_type, session_history.rating_key, title, parent_title, ' \ 'grandparent_title, thumb, parent_thumb, grandparent_thumb, media_index, parent_media_index, year, started, user ' \ - 'FROM session_history_metadata WHERE session_history.media_type != "track"' \ + 'FROM session_history_metadata ' \ 'JOIN session_history ON session_history_metadata.id = session_history.id ' \ 'ORDER BY started DESC LIMIT ?' result = monitor_db.select(query, args=[limit]) @@ -549,24 +549,25 @@ class DataFactory(object): return None for row in result: - if row[1] == 'episode' and row[6]: - thumb = row[6] - elif row[1] == 'episode': + if row[1] == 'episode' and row[7]: thumb = row[7] + elif row[1] == 'episode': + thumb = row[8] else: - thumb = row[5] + thumb = row[6] recent_output = {'row_id': row[0], 'type': row[1], 'rating_key': row[2], 'title': row[3], 'parent_title': row[4], + 'grandparent_title': row[5], 'thumb': thumb, - 'index': row[8], - 'parent_index': row[9], - 'year': row[10], - 'time': row[11], - 'user': row[12] + 'index': row[9], + 'parent_index': row[10], + 'year': row[11], + 'time': row[12], + 'user': row[13] } recently_watched.append(recent_output)