<%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': Studio ${metadata['studio']} % endif
% if metadata['type'] == 'episode' or metadata['type'] == 'movie' or metadata['type'] == 'show': Runtime ${metadata['duration']} mins % endif
% if metadata['type'] == 'episode' or metadata['type'] == 'movie' or metadata['type'] == 'show': Rated ${metadata['contentRating']} % endif
% if metadata['type'] == 'episode' or metadata['type'] == 'movie' or metadata['type'] == 'show':

${metadata['summary']}

% endif
% 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
% 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 % endif