Added leading zeros in track_number.Fixed issue #592

This commit is contained in:
py-coder
2019-08-01 10:17:24 +05:45
parent d45655a2b7
commit 0202c65110
17 changed files with 167 additions and 87 deletions

View File

@@ -16,7 +16,14 @@ https://trac.ffmpeg.org/wiki/Encode/AAC
"""
def song(input_song, output_song, folder, avconv=False, trim_silence=False, delete_original=True):
def song(
input_song,
output_song,
folder,
avconv=False,
trim_silence=False,
delete_original=True,
):
""" Do the audio format conversion. """
if avconv and trim_silence:
raise ValueError("avconv does not support trim_silence")
@@ -28,7 +35,9 @@ def song(input_song, output_song, folder, avconv=False, trim_silence=False, dele
else:
return 0
convert = Converter(input_song, output_song, folder, delete_original=delete_original)
convert = Converter(
input_song, output_song, folder, delete_original=delete_original
)
if avconv:
exit_code, command = convert.with_avconv()
else:
@@ -97,7 +106,9 @@ class Converter:
return code, command
def with_ffmpeg(self, trim_silence=False):
ffmpeg_pre = "ffmpeg -y -nostdin " # -nostdin is necessary for spotdl to be able to run in the backgroung.
ffmpeg_pre = (
"ffmpeg -y -nostdin "
) # -nostdin is necessary for spotdl to be able to run in the backgroung.
if not log.level == 10:
ffmpeg_pre += "-hide_banner -nostats -v panic "