diff --git a/Example systemd Service.md b/Example systemd Service.md index 3853718..77d14a2 100644 --- a/Example systemd Service.md +++ b/Example systemd Service.md @@ -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 +``` + diff --git a/downloader.py b/downloader.py index cf42cb2..6127f11 100755 --- a/downloader.py +++ b/downloader.py @@ -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, {