<%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: library_stats.html Version: 0.1 Variable names: data [array] data[array_index] :: Usable parameters data Returns an array containing stat data data[array_index] :: Usable parameters section_name Returns the title of the library. section_type Returns the type of the library. thumb Returns the thumb of the library. count Returns the number of top level items in the library. parent_count Returns the number of parent items in the library. child_count Returns the number of child items in the library. DOCUMENTATION :: END % if data: % for library in data: <% section_id = library['section_id'] %>
% if library['thumb'].startswith("http"): % else: % endif
    <% h1 = h2 = h3 = '' if library['section_type'] == 'movie': h1 = 'Movies' if library['section_type'] == 'show': h1, h2, h3 = 'Shows', 'Seasons', 'Episodes' elif library['section_type'] == 'artist': h1, h2, h3 = 'Artists', 'Albums', 'Tracks' elif library['section_type'] == 'photo': h1, h3 = 'Albums', 'Photos' %> % if h1:
  • ${h1}
    ${library['count']}
  • % endif % if h2:
  • ${h2}
    ${library['parent_count']}
  • % endif % if h3:
  • ${h3}
    ${library['child_count']}
  • % endif
% endfor % else:
No stats to show.

% endif