<%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: recently_added.html Version: 0.1 Variable names: data [array] data[array_index] :: Usable parameters == Global keys == media_type Returns the type of media. Either 'movie' or 'episode' or 'album'. rating_key Returns the unique identifier for the media item. parent_rating_key Returns the unique identifier for the season or artist. grandparent_rating_key Returns the unique identifier for the show. title Returns the name of the movie, episode, album. parent_title Returns the name of the artist. grandparent_title Returns the name of the show. media_index Returns the index number of the episode. parent_media_index Returns the index number of the season. section_id Returns the library section number of the media item. library_name Returns the library section name of the media item. year Returns the release year of the movie, episode, or album. thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. parent_thumb Returns the location of the artist's thumbnail. Use with pms_image_proxy. grandparent_thumb Returns the location of the show's thumbnail. Use with pms_image_proxy. added_at Returns the time when the media was added to the library. DOCUMENTATION :: END % if data != None: <% from plexpy.helpers import cast_to_int, page, short_season %> % if data:

% for item in data:
- % if item['media_type'] == 'movie':
  % if _session['user_group'] == 'admin': % endif

  ### ${item['title']}

  ### ${item['year']}

  ###

  % elif item['media_type'] == 'show':
  % if _session['user_group'] == 'admin': % endif

  ### ${item['title']}

  ### ${item['child_count']} Season${'s' if cast_to_int(item['child_count']) > 1 else ''}

  ###

  % elif item['media_type'] == 'season':
  % if item['thumb']:
  % else:
  % endif
  % if _session['user_group'] == 'admin': % endif

  ### ${item['parent_title']}

  ### ${item['title']}

  ###

  % elif item['media_type'] == 'episode':
  % if _session['user_group'] == 'admin': % endif

  ### ${item['grandparent_title']}

  ### ${item['title']}

  ### ${short_season(item['parent_title'])} · E${item['media_index']}

  % elif item['media_type'] == 'album':
  % if _session['user_group'] == 'admin': % endif

  ### ${item['parent_title']}

  ### ${item['title']}

  ###

  % endif
% endfor

% else:
No recently added items.
% endif % else:
There was an error communicating with your Plex Server.
% endif