Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start a for loop after youtube-dl is finished #17618

Closed
hollysheep opened this issue Sep 20, 2018 · 1 comment
Closed

Start a for loop after youtube-dl is finished #17618

hollysheep opened this issue Sep 20, 2018 · 1 comment

Comments

@hollysheep
Copy link

@hollysheep hollysheep commented Sep 20, 2018

i want to check for new videos in a youtube channel every day, i use cron to do that. at the moment i start youtube-dl directly from the cron. i want to delete some strings from the file name and created a shell script thats checks the files in the downloader folder. the cron now should start a shell script that
1.) checks for new files and downloas them if available
2.) rename new files in the output folder

but when i start the shell script manually the for loop starts before youtube-dl starts. i execute the script and get the error that there are no files to rename, then it jumps back to the terminal prompt. after a few moments youtube-dl starts checking for new videos and download videos if available.

how can i ensure that the for loop only starts after youtube-dl is finished, no matter how long youtube-dl needs. a simple 'sleep' should not enough because i can't say how long the downloads needs.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 20, 2018

You don't need any scripts for that. Use --download-archive and output template for naming.

@dstftw dstftw closed this Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.