fix some bugs with audio

This commit is contained in:
Adrien Beudin 2017-04-23 16:04:56 +02:00
parent 042a0ef17f
commit f5eaf8daf1
5 changed files with 37 additions and 11 deletions

View File

@ -147,14 +147,13 @@ class Audio(object):
"source": source, "source": source,
"target": target, "target": target,
"binary": "%s" % options["binary"], "binary": "%s" % options["binary"],
"format": ".%s" % options["format"],
"loglevel": "-loglevel %s" % options["loglevel"], "loglevel": "-loglevel %s" % options["loglevel"],
"audio": "-c:a %s" % options["audio"], "audio": "-c:a %s" % options["audio"],
} }
warning("Generation", source) warning("Generation", source)
command = "{binary} {loglevel} -i {source} {audio} -y {target}{format}".format(**ffmpeg_switches) command = "{binary} {loglevel} -i {source} {audio} -y {target}".format(**ffmpeg_switches)
print(command) print(command)
error(os.system(command) == 0, "%s command failed" % ffmpeg_switches["binary"]) error(os.system(command) == 0, "%s command failed" % ffmpeg_switches["binary"])

View File

@ -315,9 +315,11 @@ a.google {
width: 80px; width: 80px;
} }
/*
.author-meta { .author-meta {
padding-bottom: 7em; padding-bottom: 7em;
} }
*/
.author-info { .author-info {
color: #ccc; color: #ccc;
@ -443,3 +445,30 @@ a.google {
font-size: 10px; font-size: 10px;
} }
blockquote {
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 4em;
line-height: 0.1em;
margin-right: 0.25em;
vertical-align: -0.4em;
}
blockquote:after {
color: #ccc;
content: close-quote;
font-size: 4em;
line-height: 0.1em;
margin-left: 0.25em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}

View File

@ -1,10 +1,8 @@
{% if section.image.type == "audio" %}
{% set audio = Audio(section.image) %} {% set audio = Audio(section.image) %}
{{ audio.copy() }} {{ audio.copy() }}
{% endif %}
<div class="audio-player"> <div class="audio-player">
<h2>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h2> <h2>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h2>
<audio controls> <audio controls>
<source src="{{ audio }}.mp3" type="audio/mpeg"> <source src="{{ audio }}" type="audio/mpeg">
</audio> </audio>
</div> </div>

View File

@ -16,15 +16,17 @@
<span> <span>
<a href="http://twitter.com/{{ section.twitter }}">Twitter</a> <a href="http://twitter.com/{{ section.twitter }}">Twitter</a>
</span> </span>
{% if section.facebook or section.website %}
<span> | </span> <span> | </span>
{% endif %} {% endif %}
{% endif %}
{% if section.facebook %} {% if section.facebook %}
<span> <span>
<a href="http://facebook.com/{{ section.facebook }}">Facebook</a> <a href="http://facebook.com/{{ section.facebook }}">Facebook</a>
</span> </span>
<span> | </span>
{% endif %} {% endif %}
{% if section.website %} {% if section.website %}
<span> | </span>
<span> <span>
<a href="{{ section.sebsite }}">{{ section.website }}</a> <a href="{{ section.sebsite }}">{{ section.website }}</a>
</span> </span>

View File

@ -2,12 +2,10 @@
{% set pathstatic = ".." %} {% set pathstatic = ".." %}
{% else %} {% else %}
{% set pathstatic = "." %} {% set pathstatic = "." %}
{% endif %}
{% if section.image.type == "audio" %}
{% set audio = Audio(section.image) %}
{{ audio.copy() }} {{ audio.copy() }}
{% endif %} {% endif %}
{% set audio = Audio(section.image) %}
<h4>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h4> <h4>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h4>
<audio controls> <audio controls>
<source src="{{ pathstatic }}/{{ audio }}.mp3" type="audio/mpeg"> <source src="{{ pathstatic }}/{{ audio }}" type="audio/mpeg">
</audio> </audio>