|
|
@ -194,6 +194,11 @@ async def write_metadata(song: bytes, metadata: SongMetadata, embed_metadata: li |
|
|
|
time = datetime.strptime(metadata.created, "%Y-%m-%d").strftime("%d/%m/%Y") |
|
|
|
time = datetime.strptime(metadata.created, "%Y-%m-%d").strftime("%d/%m/%Y") |
|
|
|
else: |
|
|
|
else: |
|
|
|
time = "" |
|
|
|
time = "" |
|
|
|
|
|
|
|
if if_shell(): |
|
|
|
|
|
|
|
subprocess.run( |
|
|
|
|
|
|
|
f"mp4box -time {time} -mtime {time} -name 1={metadata.title} -itags tool=:cover={absolute_cover_path}:{metadata.to_itags_params(embed_metadata)} {song_name.absolute()}", |
|
|
|
|
|
|
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=if_shell()) |
|
|
|
|
|
|
|
else: |
|
|
|
subprocess.run(["mp4box", "-time", time, "-mtime", time, "-name", f"1={metadata.title}", "-itags", |
|
|
|
subprocess.run(["mp4box", "-time", time, "-mtime", time, "-name", f"1={metadata.title}", "-itags", |
|
|
|
":".join(["tool=", f"cover={absolute_cover_path}", |
|
|
|
":".join(["tool=", f"cover={absolute_cover_path}", |
|
|
|
metadata.to_itags_params(embed_metadata)]), |
|
|
|
metadata.to_itags_params(embed_metadata)]), |
|
|
|