From 810d9ba4c99250ddbcbd713545f9b0f5fdcd27e5 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 25 Apr 2017 16:24:41 +0200 Subject: [PATCH] fix ffmpeg code --- prosopopee/prosopopee.py | 22 +- .../exposure/templates/gallery-index.html | 7 +- .../exposure/templates/sections/audio.html | 10 +- .../templates/sections/bordered-picture.html | 3 +- .../templates/sections/full-picture.html | 3 +- .../templates/sections/pictures-group.html | 3 +- .../light/templates/sections/audio.html | 10 +- .../material/static/css/materialize.css | 5433 +++------- .../material/static/js/materialize.min.js | 12 +- prosopopee/themes/new_material/static/LICENSE | 21 + .../themes/new_material/static/README.md | 70 + .../static/css/baguetteBox.min.css | 6 + .../new_material/static/css/font-awesome.css | 2086 ++++ .../themes/new_material/static/css/fonts.css | 111 + .../css/gallery-dark-materialize.min.css | 6895 +++++++++++++ .../new_material/static/css/materialize.css | 8872 +++++++++++++++++ .../static/css/panorama_viewer.css | 58 + .../themes/new_material/static/css/styles.css | 186 + .../new_material/static/fonts/FontAwesome.otf | Bin 0 -> 109688 bytes .../new_material/static/fonts/LICENSE.txt | 428 + .../static/fonts/Material-Design-Icons.eot | Bin 0 -> 102112 bytes .../static/fonts/Material-Design-Icons.svg | 769 ++ .../static/fonts/Material-Design-Icons.ttf | Bin 0 -> 101892 bytes .../static/fonts/Material-Design-Icons.woff | Bin 0 -> 101968 bytes .../static/fonts/Material-Design-Icons.woff2 | Bin 0 -> 33220 bytes .../new_material/static/fonts/Roboto-Bold.eot | Bin 0 -> 20966 bytes .../new_material/static/fonts/Roboto-Bold.ttf | Bin 0 -> 127744 bytes .../static/fonts/Roboto-Bold.woff | Bin 0 -> 62876 bytes .../static/fonts/Roboto-Bold.woff2 | Bin 0 -> 49976 bytes .../static/fonts/Roboto-Light.eot | Bin 0 -> 20940 bytes .../static/fonts/Roboto-Light.ttf | Bin 0 -> 126792 bytes .../static/fonts/Roboto-Light.woff | Bin 0 -> 62316 bytes .../static/fonts/Roboto-Light.woff2 | Bin 0 -> 49380 bytes .../static/fonts/Roboto-Medium.eot | Bin 0 -> 21364 bytes .../static/fonts/Roboto-Medium.ttf | Bin 0 -> 127488 bytes .../static/fonts/Roboto-Medium.woff | Bin 0 -> 62980 bytes .../static/fonts/Roboto-Medium.woff2 | Bin 0 -> 50224 bytes .../static/fonts/Roboto-Regular.eot | Bin 0 -> 21320 bytes .../static/fonts/Roboto-Regular.ttf | Bin 0 -> 126072 bytes .../static/fonts/Roboto-Regular.woff | Bin 0 -> 61736 bytes .../static/fonts/Roboto-Regular.woff2 | Bin 0 -> 49236 bytes .../new_material/static/fonts/Roboto-Thin.eot | Bin 0 -> 21659 bytes .../new_material/static/fonts/Roboto-Thin.ttf | Bin 0 -> 127584 bytes .../static/fonts/Roboto-Thin.woff | Bin 0 -> 61628 bytes .../static/fonts/Roboto-Thin.woff2 | Bin 0 -> 48524 bytes .../static/fonts/crimsontext-bold-webfont.eot | Bin 0 -> 40019 bytes .../static/fonts/crimsontext-bold-webfont.svg | 1478 +++ .../static/fonts/crimsontext-bold-webfont.ttf | Bin 0 -> 95088 bytes .../fonts/crimsontext-bold-webfont.woff | Bin 0 -> 44520 bytes .../fonts/crimsontext-bold-webfont.woff2 | Bin 0 -> 36056 bytes .../fonts/crimsontext-bolditalic-webfont.eot | Bin 0 -> 43387 bytes .../fonts/crimsontext-bolditalic-webfont.svg | 1112 +++ .../fonts/crimsontext-bolditalic-webfont.ttf | Bin 0 -> 98136 bytes .../fonts/crimsontext-bolditalic-webfont.woff | Bin 0 -> 50584 bytes .../crimsontext-bolditalic-webfont.woff2 | Bin 0 -> 39592 bytes .../fonts/crimsontext-italic-webfont.eot | Bin 0 -> 46788 bytes .../fonts/crimsontext-italic-webfont.svg | 1061 ++ .../fonts/crimsontext-italic-webfont.ttf | Bin 0 -> 107368 bytes .../fonts/crimsontext-italic-webfont.woff | Bin 0 -> 52808 bytes .../fonts/crimsontext-italic-webfont.woff2 | Bin 0 -> 42004 bytes .../fonts/crimsontext-regular-webfont.eot | Bin 0 -> 45239 bytes .../fonts/crimsontext-regular-webfont.svg | 1171 +++ .../fonts/crimsontext-regular-webfont.ttf | Bin 0 -> 99096 bytes .../fonts/crimsontext-regular-webfont.woff | Bin 0 -> 49796 bytes .../fonts/crimsontext-regular-webfont.woff2 | Bin 0 -> 40448 bytes .../fonts/crimsontext-semibold-webfont.eot | Bin 0 -> 40036 bytes .../fonts/crimsontext-semibold-webfont.svg | 1168 +++ .../fonts/crimsontext-semibold-webfont.ttf | Bin 0 -> 82496 bytes .../fonts/crimsontext-semibold-webfont.woff | Bin 0 -> 46196 bytes .../fonts/crimsontext-semibold-webfont.woff2 | Bin 0 -> 36220 bytes .../crimsontext-semibolditalic-webfont.eot | Bin 0 -> 42508 bytes .../crimsontext-semibolditalic-webfont.svg | 1071 ++ .../crimsontext-semibolditalic-webfont.ttf | Bin 0 -> 92576 bytes .../crimsontext-semibolditalic-webfont.woff | Bin 0 -> 49572 bytes .../crimsontext-semibolditalic-webfont.woff2 | Bin 0 -> 38888 bytes .../static/fonts/fontawesome-webfont.eot | Bin 0 -> 70807 bytes .../static/fonts/fontawesome-webfont.svg | 655 ++ .../static/fonts/fontawesome-webfont.ttf | Bin 0 -> 142072 bytes .../static/fonts/fontawesome-webfont.woff | Bin 0 -> 83588 bytes .../static/fonts/fontawesome-webfont.woff2 | Bin 0 -> 66624 bytes .../fonts/montserrat-regular-webfont.eot | Bin 0 -> 21106 bytes .../fonts/montserrat-regular-webfont.svg | 501 + .../fonts/montserrat-regular-webfont.ttf | Bin 0 -> 44516 bytes .../fonts/montserrat-regular-webfont.woff | Bin 0 -> 24636 bytes .../fonts/montserrat-regular-webfont.woff2 | Bin 0 -> 18708 bytes .../fonts/montserrat-semibold-webfont.eot | Bin 0 -> 21362 bytes .../fonts/montserrat-semibold-webfont.svg | 507 + .../fonts/montserrat-semibold-webfont.ttf | Bin 0 -> 45140 bytes .../fonts/montserrat-semibold-webfont.woff | Bin 0 -> 24932 bytes .../fonts/montserrat-semibold-webfont.woff2 | Bin 0 -> 18924 bytes .../themes/new_material/static/img/logo.svg | 57 + .../new_material/static/js/baguetteBox.min.js | 7 + .../static/js/jquery-2.1.4.min.js | 4 + .../static/js/jquery.lazyload.min.js | 2 + .../static/js/jquery.panorama_viewer.min.js | 1 + .../new_material/static/js/materialize.min.js | 10 + .../new_material/templates/.prosopopee_cache | 1 + .../themes/new_material/templates/base.html | 60 + .../themes/new_material/templates/feed.xml | 13 + .../themes/new_material/templates/footer.html | 16 + .../new_material/templates/gallery-index.html | 138 + .../themes/new_material/templates/index.html | 51 + .../themes/new_material/templates/item.html | 16 + .../themes/new_material/templates/menu.html | 31 + .../new_material/templates/opengraph.html | 16 + .../new_material/templates/page-example.html | 103 + .../themes/new_material/templates/page.html | 33 + .../templates/sections/author.html | 52 + .../templates/sections/bordered-picture.html | 36 + .../templates/sections/full-picture.html | 32 + .../new_material/templates/sections/html.html | 13 + .../templates/sections/panorama.html | 5 + .../templates/sections/paragraph.html | 19 + .../templates/sections/pictures-group.html | 52 + .../new_material/templates/sections/text.html | 11 + .../themes/new_material/templates/share.html | 24 + 116 files changed, 30603 insertions(+), 3929 deletions(-) create mode 100644 prosopopee/themes/new_material/static/LICENSE create mode 100755 prosopopee/themes/new_material/static/README.md create mode 100644 prosopopee/themes/new_material/static/css/baguetteBox.min.css create mode 100644 prosopopee/themes/new_material/static/css/font-awesome.css create mode 100644 prosopopee/themes/new_material/static/css/fonts.css create mode 100644 prosopopee/themes/new_material/static/css/gallery-dark-materialize.min.css create mode 100644 prosopopee/themes/new_material/static/css/materialize.css create mode 100644 prosopopee/themes/new_material/static/css/panorama_viewer.css create mode 100644 prosopopee/themes/new_material/static/css/styles.css create mode 100644 prosopopee/themes/new_material/static/fonts/FontAwesome.otf create mode 100644 prosopopee/themes/new_material/static/fonts/LICENSE.txt create mode 100644 prosopopee/themes/new_material/static/fonts/Material-Design-Icons.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Material-Design-Icons.svg create mode 100644 prosopopee/themes/new_material/static/fonts/Material-Design-Icons.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Material-Design-Icons.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Material-Design-Icons.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Bold.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Bold.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Bold.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Bold.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Light.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Light.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Light.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Light.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Medium.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Medium.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Medium.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Medium.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Regular.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Regular.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Regular.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Regular.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Thin.eot create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Thin.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Thin.woff create mode 100644 prosopopee/themes/new_material/static/fonts/Roboto-Thin.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bold-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bold-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bold-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bold-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bold-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bolditalic-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bolditalic-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bolditalic-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bolditalic-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-bolditalic-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-italic-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-italic-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-italic-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-italic-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-italic-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-regular-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-regular-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-regular-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-regular-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-regular-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibold-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibold-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibold-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibold-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibold-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibolditalic-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibolditalic-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibolditalic-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibolditalic-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/crimsontext-semibolditalic-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/fontawesome-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/fontawesome-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/fontawesome-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/fontawesome-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/fontawesome-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-regular-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-regular-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-regular-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-regular-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-regular-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-semibold-webfont.eot create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-semibold-webfont.svg create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-semibold-webfont.ttf create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-semibold-webfont.woff create mode 100644 prosopopee/themes/new_material/static/fonts/montserrat-semibold-webfont.woff2 create mode 100644 prosopopee/themes/new_material/static/img/logo.svg create mode 100644 prosopopee/themes/new_material/static/js/baguetteBox.min.js create mode 100644 prosopopee/themes/new_material/static/js/jquery-2.1.4.min.js create mode 100644 prosopopee/themes/new_material/static/js/jquery.lazyload.min.js create mode 100644 prosopopee/themes/new_material/static/js/jquery.panorama_viewer.min.js create mode 100644 prosopopee/themes/new_material/static/js/materialize.min.js create mode 100644 prosopopee/themes/new_material/templates/.prosopopee_cache create mode 100644 prosopopee/themes/new_material/templates/base.html create mode 100644 prosopopee/themes/new_material/templates/feed.xml create mode 100644 prosopopee/themes/new_material/templates/footer.html create mode 100644 prosopopee/themes/new_material/templates/gallery-index.html create mode 100644 prosopopee/themes/new_material/templates/index.html create mode 100644 prosopopee/themes/new_material/templates/item.html create mode 100644 prosopopee/themes/new_material/templates/menu.html create mode 100644 prosopopee/themes/new_material/templates/opengraph.html create mode 100644 prosopopee/themes/new_material/templates/page-example.html create mode 100644 prosopopee/themes/new_material/templates/page.html create mode 100644 prosopopee/themes/new_material/templates/sections/author.html create mode 100644 prosopopee/themes/new_material/templates/sections/bordered-picture.html create mode 100644 prosopopee/themes/new_material/templates/sections/full-picture.html create mode 100644 prosopopee/themes/new_material/templates/sections/html.html create mode 100644 prosopopee/themes/new_material/templates/sections/panorama.html create mode 100644 prosopopee/themes/new_material/templates/sections/paragraph.html create mode 100644 prosopopee/themes/new_material/templates/sections/pictures-group.html create mode 100644 prosopopee/themes/new_material/templates/sections/text.html create mode 100644 prosopopee/themes/new_material/templates/share.html diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index f8f5d0a..ed84cf7 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -36,13 +36,14 @@ SETTINGS = { "abitrate": "100k", "audio": "libvorbis", "video": "libvpx", - "other": "-qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k" + "other": "-qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k", + "extension": "webm" }, "ffmpeg_audio": { "binary": "ffmpeg", "loglevel": "error", - "format": "mp3", - "audio": "libmp3lame" + "audio": "libmp3lame", + "extension": "mp3" } } @@ -66,6 +67,10 @@ class Video(object): return self.options["name"] def ffmpeg(self, source, target, options): + if options.get("resize"): + target = target + else: + target = target + "." + options["extension"] if not CACHE.needs_to_be_generated(source, target, options): okgreen("Skipped", source + " is already generated") return @@ -95,6 +100,8 @@ class Video(object): command = "{binary} {loglevel} -i {source} {video} {vbitrate} {other} {audio} {abitrate} {resolution} {format} -y {target}".format(**ffmpeg_switches) print(command) error(os.system(command) == 0, "%s command failed" % ffmpeg_switches["binary"]) + target = target + "." + options["extension"] + print target CACHE.cache_picture(source, target, options) @@ -139,6 +146,7 @@ class Audio(object): return self.options["name"] def ffmpeg(self, source, target, options): + target = target + "." + options["extension"] if not CACHE.needs_to_be_generated(source, target, options): okgreen("Skipped", source + " is already generated") return @@ -148,11 +156,11 @@ class Audio(object): "target": target, "binary": "%s" % options["binary"], "loglevel": "-loglevel %s" % options["loglevel"], - "audio": "-c:a %s" % options["audio"], + "audio": "-c:a %s" % options["audio"] } warning("Generation", source) - + command = "{binary} {loglevel} -i {source} {audio} -y {target}".format(**ffmpeg_switches) print(command) error(os.system(command) == 0, "%s command failed" % ffmpeg_switches["binary"]) @@ -257,6 +265,10 @@ def get_settings(): if key not in settings: settings[key] = value + for key, value in SETTINGS.items(): + if key not in settings: + settings[key] = value + if settings["settings"].get("ffmpeg"): SETTINGS["ffmpeg"].update(settings["settings"]["ffmpeg"]) diff --git a/prosopopee/themes/exposure/templates/gallery-index.html b/prosopopee/themes/exposure/templates/gallery-index.html index 2a4d18f..ae75a7d 100644 --- a/prosopopee/themes/exposure/templates/gallery-index.html +++ b/prosopopee/themes/exposure/templates/gallery-index.html @@ -67,7 +67,7 @@ $('audio').mediaelementplayer({ AndroidUseNativeControls: true }); -var video = $("video.lazy"); +var video = $("video"); video.on('click', function(e){ var vid = video[0]; vid.play(); @@ -82,12 +82,15 @@ video.on('click', function(e){ $(function() { $("img.lazy").lazyload({ + threshold : 400, effect : "fadeIn" }); $("video.lazy").lazyload({ + threshold : 400, effect : "fadeIn" }); $("section.lazy").lazyload({ + threshold : 400, effect : "fadeIn" }); }); @@ -122,7 +125,7 @@ var slowLoad = window.setTimeout( function() { div.appendChild(dismiss_container); html_node.appendChild(div); -}, 1000 ); +}, 10000 ); window.addEventListener( 'load', function() { try { diff --git a/prosopopee/themes/exposure/templates/sections/audio.html b/prosopopee/themes/exposure/templates/sections/audio.html index 42472cb..cf99913 100644 --- a/prosopopee/themes/exposure/templates/sections/audio.html +++ b/prosopopee/themes/exposure/templates/sections/audio.html @@ -1,8 +1,14 @@ {% set audio = Audio(section.image) %} +{% set extension = settings.ffmpeg_audio.extension %} +{% if extension == "mp3" %} +{% set format = "mpeg" %} +{% else %} +{% set format = extension %} +{% endif %} {{ audio.copy() }}

{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}

-
diff --git a/prosopopee/themes/exposure/templates/sections/bordered-picture.html b/prosopopee/themes/exposure/templates/sections/bordered-picture.html index 2db4a2b..7f7e446 100644 --- a/prosopopee/themes/exposure/templates/sections/bordered-picture.html +++ b/prosopopee/themes/exposure/templates/sections/bordered-picture.html @@ -3,13 +3,14 @@ {% endif %} {% if section.image.type == "video" %} {% set video = Video(section.image) %} + {% set format = settings.ffmpeg.extension %} {% set caption = section.text %} {{ video.copy() }}
{% if caption %}
diff --git a/prosopopee/themes/exposure/templates/sections/full-picture.html b/prosopopee/themes/exposure/templates/sections/full-picture.html index 7b88dc8..d0a96c9 100644 --- a/prosopopee/themes/exposure/templates/sections/full-picture.html +++ b/prosopopee/themes/exposure/templates/sections/full-picture.html @@ -1,4 +1,5 @@ {% if section.image.type == "video" %} +{% set format = settings.ffmpeg.extension %} {% set video = Video(section.image) %} {{ video.copy() }}
@@ -18,7 +19,7 @@
{% endif %}
diff --git a/prosopopee/themes/exposure/templates/sections/pictures-group.html b/prosopopee/themes/exposure/templates/sections/pictures-group.html index 13843ab..1a0fa42 100644 --- a/prosopopee/themes/exposure/templates/sections/pictures-group.html +++ b/prosopopee/themes/exposure/templates/sections/pictures-group.html @@ -9,10 +9,11 @@ {% if image.type == "video" %} {% set caption = image.text %} {% set video = Video(image) %} + {% set format = settings.ffmpeg.extension %} {{ video.copy() }} {% if caption %}
diff --git a/prosopopee/themes/light/templates/sections/audio.html b/prosopopee/themes/light/templates/sections/audio.html index 46a79e3..3d5e200 100644 --- a/prosopopee/themes/light/templates/sections/audio.html +++ b/prosopopee/themes/light/templates/sections/audio.html @@ -1,3 +1,9 @@ +{% set extension = settings.ffmpeg_audio.extension %} +{% if extension == "mp3" %} +{% set format = "mpeg" %} +{% else %} +{% set format = extension %} +{% endif %} {% if settings.settings.light_mode %} {% set pathstatic = ".." %} {% else %} @@ -6,6 +12,6 @@ {% endif %} {% set audio = Audio(section.image) %}

{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}

-