<%inherit file="base.html"/> <%! from plexpy import helpers %> <%def name="headIncludes()"> <%def name="body()"> % if metadata:
% if metadata['type'] == 'episode': % else: % endif
% if metadata['type'] == 'movie':

# ${metadata['title']} (${metadata['year']})

% elif metadata['type'] == 'season':

# ${metadata['parentTitle']} (${metadata['title']})

% elif metadata['type'] == 'episode':

# ${metadata['grandparentTitle']} (Season ${metadata['parentIndex']}, Episode ${metadata['index']}) "${metadata['title']}"

% else:

# ${metadata['title']}

% endif
% if metadata['type'] == 'movie':
% endif
% if metadata['type'] == 'episode' or metadata['type'] == 'movie': % if metadata['directors']: Directed by ${metadata['directors'][0]} % else: Directed by unknown % endif % elif metadata['type'] == 'show' or metadata['type'] == 'season': Studio ${metadata['studio']} % endif
Runtime ${metadata['duration']} mins
Rated ${metadata['contentRating']}

${metadata['summary']}

% if metadata['type'] == 'episode':

###### Written by

% for writer in metadata['writers']: % if loop.index < 5:
- ${writer}
% endif % endfor

% elif metadata['type'] == 'movie' or metadata['type'] == 'show':

###### Genres

% for genre in metadata['genres']: % if loop.index < 5:
- ${genre}
% endif % endfor

###### Starring

% for actor in metadata['actors']: % if loop.index < 5:
- ${actor}
% endif % endfor

% elif metadata['type'] == 'season':
% endif
% if metadata['type'] == 'movie' or metadata['type'] == 'episode' or metadata['type'] == 'show':

### Watch history for ${metadata['title']}

ID | Time | User | Platform | IP Address | Title | Started | Paused | Stopped | Duration | Completed | RatingKey |
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

% elif metadata['type'] == 'season':

### Episode list for ${metadata['title']}

% endif
% else:

### Error retrieving item metadata. This media may not be available in the Plex Media Server database anymore.

% endif <%def name="javascriptIncludes()">
% if metadata: % if metadata['type'] == 'movie':
% endif % if metadata['type'] == 'movie' or metadata['type'] == 'episode':
% elif metadata['type'] == 'show':
% endif % if metadata['type'] == 'season':
% endif % endif