{% for subdirname, subdirobj in dir.get_subdirs().items() %}
{%- set subdirpath = os.path.relpath(subdirobj.fullpath, music_library.fullpath) %}
{{ subdirpath }}/
{{- dirlisting(subdirobj, subdirpath) -}}
{% endfor %}
{%- set files = dir.get_files() %}
{%- if files %}
{% for file in files %}
{% set filepath = os.path.relpath(os.path.join(dir.fullpath, file), music_library.fullpath) %}
{{ filepath }}
{% endfor %}
{%- endif %}
{%- endmacro %}
botamusique web interface
Play List
Currently Playing :
{% if playlist|length > 0 %}
{% if 'url' in playlist[0] %}
({{ playlist[0]['url'] }})
{% elif 'path' in playlist[0] %}
({{ playlist[0]['path'] }})
{% endif %}
{% else %}
No music
{% endif %}
Playlist :
Type
Title
Url/Path
Action
{% for m in playlist[1:] %}
{{ m['type'] }}
{% if 'title' in m %}
({{ m['title'] }})
{% else %}
No title
{% endif %}
{% if 'url' in m %}
({{ m['url'] }})
{% elif 'path' in m %}
({{ m['path'] }})
{% endif %}