forked from MarseyWorld/MarseyWorld
use /temp_songs directory
parent
68da9828b3
commit
96b8afa617
|
@ -21,6 +21,7 @@ RUN mkdir /images
|
|||
RUN mkdir /chat_images
|
||||
RUN mkdir /dm_images
|
||||
RUN mkdir /songs
|
||||
RUN mkdir /temp_songs
|
||||
RUN mkdir /videos
|
||||
RUN mkdir /audio
|
||||
RUN mkdir /asset_submissions
|
||||
|
|
|
@ -779,7 +779,7 @@ def settings_song_change(v):
|
|||
|
||||
ydl_opts = {
|
||||
'cookiefile': '.cookies',
|
||||
'outtmpl': '/songs/%(title)s.%(ext)s',
|
||||
'outtmpl': '/temp_songs/%(title)s.%(ext)s',
|
||||
'format': 'bestaudio/best',
|
||||
'postprocessors': [{
|
||||
'key': 'FFmpegExtractAudio',
|
||||
|
@ -796,8 +796,8 @@ def settings_song_change(v):
|
|||
v=v,
|
||||
error="Age-restricted videos aren't allowed."), 400
|
||||
|
||||
files = os.listdir("/songs/")
|
||||
paths = [path.join("/songs/", basename) for basename in files]
|
||||
files = os.listdir("/temp_songs/")
|
||||
paths = [path.join("/temp_songs/", basename) for basename in files]
|
||||
songfile = max(paths, key=path.getctime)
|
||||
os.rename(songfile, f"/songs/{id}.mp3")
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ mkdir /images
|
|||
mkdir /chat_images
|
||||
mkdir /dm_images
|
||||
mkdir /songs
|
||||
mkdir /temp_songs
|
||||
mkdir /videos
|
||||
mkdir /audio
|
||||
mkdir /asset_submissions
|
||||
|
|
Loading…
Reference in New Issue