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