fix Inappropriate ioctl for device
This commit is contained in:
parent
84aeafa048
commit
529bf22ba3
|
@ -16,9 +16,17 @@ Group=user
|
|||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Now start the service
|
||||
Now start the service:
|
||||
```bash
|
||||
chmod +x /home/user/youtubedl-daemon.sh
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now youtube-dl
|
||||
```
|
||||
|
||||
|
||||
|
||||
You can watch the process with:
|
||||
|
||||
```bash
|
||||
sudo journalctl -b -u youtube-dl.service
|
||||
```
|
||||
|
||||
|
|
|
@ -229,7 +229,9 @@ while True:
|
|||
|
||||
if len(download_queue): # Don't mess with multiprocessing if all videos are already downloaded
|
||||
with Pool(processes=args.threads) as pool:
|
||||
status_bar.set_description_str('=' * os.get_terminal_size()[0])
|
||||
# Doesn't work if not connected to a terminal
|
||||
if sys.stdout.isatty():
|
||||
status_bar.set_description_str('=' * os.get_terminal_size()[0]) # OSError: [Errno 25] Inappropriate ioctl for device
|
||||
logger.info('Starting downloads...')
|
||||
for result in pool.imap_unordered(download_video,
|
||||
((video, {
|
||||
|
|
Reference in New Issue