fix: util failed on some strange encoded files

This commit is contained in:
Terry Geng
2020-03-08 15:08:46 +08:00
parent 369af16aed
commit f931ae7d28
4 changed files with 28 additions and 6 deletions

View File

@ -1,5 +1,6 @@
{% macro dirlisting(dir, path='') -%}
<ul class="list-group">
{% if dir and dir.get_subdirs().items() %}
{% for subdirname, subdirobj in dir.get_subdirs().items() %}
{%- set subdirpath = os.path.relpath(subdirobj.fullpath, music_library.fullpath) %}
{%- set subdirid = subdirpath.replace("/","-") %}
@ -47,6 +48,7 @@
{{- dirlisting(subdirobj, subdirpath) -}}
</div>
{% endfor %}
{% endif %}
{%- set files = dir.get_files() %}
{%- if files %}
{% for file in files %}