<%doc> USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/ Filename: info.html Version: 0.1 Variable names: data [list] data :: Usable parameters (if not applicable for media type, blank value will be returned) == Global keys == rating_key Returns the unique identifier for the media item. media_type Returns the type of media. Either 'movie', 'show', 'season', 'episode', 'artist', 'album', or 'track'. art Returns the location of the item's artwork title Returns the name of the movie, show, episode, artist, album, or track. duration Returns the standard runtime of the media. content_rating Returns the age rating for the media. summary Returns a brief description of the media plot. grandparent_title Returns the name of the show, or artist. parent_media_index Returns the index number of the season. media_index Returns the index number of the episode, or track. parent_thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. writers Returns an array of writers. thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. parent_title Returns the name of the show, or artist. rating Returns the 5 star rating value for the movie. Between 1 and 5. year Returns the release year of the movie, or show. genres Returns an array of genres. actors Returns an array of actors. directors Returns an array of directors. studio Returns the name of the studio. originally_available_at Returns the air date of the item. DOCUMENTATION :: END <%! import re from plexpy import common # Get audio codec file def af(codec): for pattern, file in common.MEDIA_FLAGS_AUDIO.iteritems(): if re.match(pattern, codec): return file return codec # Get audio codec file def vf(codec): for pattern, file in common.MEDIA_FLAGS_VIDEO.iteritems(): if re.match(pattern, codec): return file return codec %> <%inherit file="base.html"/> <%def name="headIncludes()"> <%def name="body()"> % if data:
% if data['media_type'] == 'track': % else: % endif % if data['media_type'] == 'episode':
% elif data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
% else:
% endif
% if data['media_type'] == 'movie' or data['media_type'] == 'show' or data['media_type'] == 'artist':

#

# ${data['title']}

% elif data['media_type'] == 'season':

#

# ${data['parent_title']}

### S${data['media_index']}

% elif data['media_type'] == 'episode':

# ${data['grandparent_title']}

## ${data['title']}

### S${data['parent_media_index']} · E${data['media_index']}

% elif data['media_type'] == 'album':

# ${data['parent_title']}

## ${data['title']}

% elif data['media_type'] == 'track':

# ${data['grandparent_title']}

## ${data['parent_title']} - ${data['title']}

### T${data['media_index']}

% endif
% if data['media_type'] == 'movie':
% elif data['media_type'] == 'show' or data['media_type'] == 'season':
% elif data['media_type'] == 'episode':
% elif data['media_type'] == 'artist' or data['media_type'] == 'album':
% elif data['media_type'] == 'track':
% else:
% endif % if data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track':
% if data['media_type'] != 'track' and data['video_codec']: % endif % if data['media_type'] != 'track' and data['video_resolution']: % endif % if data['audio_codec']: % endif % if data['audio_channels']: % endif
% endif
% if data['rating']:
% for i in range(0,5): % if round(float(data['rating']) / 2) > i: % else: % endif % endfor
% endif
% if data['directors']: Directed by ${data['directors'][0]} % endif
% if data['studio']: Studio ${data['studio']} % endif
% if data['media_type'] == 'movie': Year ${data['year']} % elif data['media_type'] == 'show': Aired ${data['year']} % elif data['media_type'] == 'episode': Aired ${data['originally_available_at']} % elif data['media_type'] == 'album' or data['media_type'] == 'track': Released ${data['year']} % endif
% if data['duration']: Runtime ${data['duration']} mins % endif
% if data['content_rating']: Rated ${data['content_rating']} % endif
% if data['tagline']:

${data['tagline']}

% endif

${data['summary']}

% if data['writers']:
Written by

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

% endif % if data['actors']:
Starring

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

% endif
% if data['genres']:
Genres

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

% endif
% if data['media_type'] == 'show':
Season List for ${data['title']}
Loading season list...
% elif data['media_type'] == 'season':
Episode List for ${data['title']}
Loading episode list...
% elif data['media_type'] == 'artist':
Album List for ${data['title']}
Loading album list...
% elif data['media_type'] == 'album':
Track List for ${data['title']}
Loading track list...
% endif
Watch History for ${data['title']}
% if _session['user_group'] == 'admin':
Select rows to delete. Data is deleted upon exiting delete mode.
% if source == 'history':
Fix Metadata
% endif % if data.get('poster_url'):
% if data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track': % else: % endif
% endif % endif

Delete | Time | User | IP Address | Platform | Player | Title | Started | Paused | Stopped | Duration |
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

#### Confirm Delete

Are you REALLY sure you want to delete history item(s)?

This is permanent and cannot be undone!

% endif <%def name="javascriptIncludes()">
% if data:
% if data['media_type'] == 'show' or data['media_type'] == 'artist':
% elif data['media_type'] == 'season' or data['media_type'] == 'album':
% elif data['media_type'] == 'episode' or data['media_type'] == 'track' or data['media_type'] == 'movie':
% endif
% if data['media_type'] == 'show' or data['media_type'] == 'season' or data['media_type'] == 'artist' or data['media_type'] == 'album':
% endif
% if data.get('poster_url'):
% endif % endif