mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 02:22:25 +01:00
#380: Template.safe_substitute
This way, you almost never need to use the $$ escape sequence.
This commit is contained in:
parent
dfea8ea05e
commit
a6798f9ba3
2 changed files with 4 additions and 4 deletions
|
|
@ -93,7 +93,7 @@ def encode(source, dest):
|
|||
|
||||
for arg in command:
|
||||
arg = arg.encode('utf-8')
|
||||
opts.append(Template(arg).substitute({
|
||||
opts.append(Template(arg).safe_substitute({
|
||||
'source': source,
|
||||
'dest': dest,
|
||||
}))
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ These config options control the transcoding process:
|
|||
* ``command`` is the command line to use to transcode audio. A default
|
||||
command, usually using an FFmpeg invocation, is implied by the ``format``
|
||||
option. The tokens ``$source`` and ``$dest`` in the command are replaced
|
||||
with the paths to the existing and new file. (Use ``$$`` to emit a literal
|
||||
dollars sign.) For example, the command ``ffmpeg -i $source -y -aq 4 $dest``
|
||||
transcodes to MP3 using FFmpeg at the V4 quality level.
|
||||
with the paths to the existing and new file. For example, the command
|
||||
``ffmpeg -i $source -y -aq 4 $dest`` transcodes to MP3 using FFmpeg at the
|
||||
V4 quality level.
|
||||
|
||||
Here's an example configuration::
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue