hard specify ffmpeg, embed thumbnail

thumbnail may create longer wait time for return, ffmpeg may be temporary until droplet is restarted
This commit is contained in:
Xevion
2019-12-24 19:53:29 -06:00
parent 5a5cd155ef
commit af02f90aa3

View File

@@ -49,7 +49,7 @@ class YouTubeAudio(db.Model):
def download(self): def download(self):
print(f'Attempting download of {self.id}') print(f'Attempting download of {self.id}')
subprocess.run(f'youtube-dl -x -4 --restrict-filenames --audio-format mp3 -o ./app/sounds/youtube/%(id)s.%(ext)s {self.id}'.split(' ')) subprocess.run(f'youtube-dl -x -4 --restrict-filenames --ffmpeg-location ffmpeg --embed-thumbnail --audio-format mp3 -o ./app/sounds/youtube/%(id)s.%(ext)s {self.id}'.split(' '))
print(f'Download attempt for {self.id} finished.') print(f'Download attempt for {self.id} finished.')
def delete(self): def delete(self):