<%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 notifiers from plexpy.common import MEDIA_TYPE_HEADERS, MEDIA_FLAGS_AUDIO, MEDIA_FLAGS_VIDEO # Get audio codec file def af(codec): for pattern, file_type in MEDIA_FLAGS_AUDIO.iteritems(): if re.match(pattern, codec): return file_type return codec # Get audio codec file def vf(codec): for pattern, file_type in MEDIA_FLAGS_VIDEO.iteritems(): if re.match(pattern, codec): return file_type return codec def br(text): return text.replace('\n', '
') %> <%inherit file="base.html"/> <%def name="headIncludes()"> <%def name="body()"> % if data: <% media_info = data['media_info'][0] if data['media_info'] else {} %>
% if _session['user_group'] == 'admin': % endif
% if data['media_type'] == 'track': % else: % endif % if data['media_type'] == 'episode':
% if _session['user_group'] == 'admin': % endif % elif data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
% if _session['user_group'] == 'admin': % endif % else:
% if _session['user_group'] == 'admin': % endif % endif
% if data['media_type'] in ('movie', 'show', 'artist', 'collection'):

#

# ${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'] in ('show', 'season', 'collection'):
% 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'] in ('movie', 'episode', 'track'):
% if data['media_type'] != 'track' and media_info['video_codec']: % endif % if data['media_type'] != 'track' and media_info['video_resolution']: % endif % if media_info['audio_codec']: % endif % if media_info['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']} % elif data['media_type'] == 'collection': Year ${data['min_year']} - ${data['max_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'] | br, n}

% 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...
% elif data['media_type'] == 'collection':
${MEDIA_TYPE_HEADERS[data['sub_media_type']]} in ${data['title']} collection
Loading movies list...
% endif % if data['media_type'] != 'collection':
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('tvmaze_id') or data.get('themoviedb_id'):
% 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 | Date | User | IP Address | Platform | Player | Title | Started | Paused | Stopped | Duration |
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

% endif
% endif <%def name="modalIncludes()">

#### Confirm Delete

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

This is permanent and cannot be undone!

#### Recently Added Notification

Send a recently added notification for the following:

% if data['media_type'] == 'movie': ${data['title']}
${data['year']} % elif data['media_type'] == 'show': ${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'] == 'artist': ${data['title']} % elif data['media_type'] == 'album': ${data['parent_title']}
${data['title']} % elif data['media_type'] == 'track': ${data['grandparent_title']}
${data['title']}
${data['parent_title']} % endif

Select the Notification Agent

Note: All custom notification conditions will be bypassed.

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