mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +00:00
Improved transcoding configuration parsing
This commit is contained in:
parent
efbe0d4a4b
commit
e5d9050fa7
@ -11,6 +11,7 @@ import codecs
|
||||
import mimetypes
|
||||
import os.path
|
||||
import requests
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
from flask import request, Response, send_file
|
||||
@ -28,7 +29,7 @@ from .exceptions import GenericError, MissingParameter, NotFound, ServerError, U
|
||||
def prepare_transcoding_cmdline(base_cmdline, input_file, input_format, output_format, output_bitrate):
|
||||
if not base_cmdline:
|
||||
return None
|
||||
ret = base_cmdline.split()
|
||||
ret = shlex.split(base_cmdline)
|
||||
ret = [
|
||||
part.replace('%srcpath', input_file).replace('%srcfmt', input_format).replace('%outfmt', output_format).replace('%outrate', str(output_bitrate))
|
||||
for part in ret
|
||||
|
Loading…
Reference in New Issue
Block a user