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

Playlist script, are there room for improvement? #2208

Closed
davidhedlund opened this issue Jan 23, 2014 · 2 comments
Closed

Playlist script, are there room for improvement? #2208

davidhedlund opened this issue Jan 23, 2014 · 2 comments

Comments

@davidhedlund
Copy link

@davidhedlund davidhedlund commented Jan 23, 2014

#!/bin/sh

echo "Afgin - Old is Gold
Space Tribe vs Psywalker - Gathering Of The Tribes" > a.txt

for x in $(find . -name "*.txt"); do

downloaded="no";

while read line; do

  youtube-dl "ytsearch10:$line" -o "$(echo $x | sed -e s,.txt,,)/%(playlist)s - %(id)s.%(ext)s" -f 172/171/43/webm/ogg --extract-audio --no-overwrites --match-title ^"$line"$ --verbose --ignore-errors --max-downloads 10

done < $x


done


#############################################################################################
# Explanation of the script

# ytsearch: just returns the top video result. Use ytsearch10:, ytsearch42: (or any other number), or ytsearchall:, although the latter can result in an excessive number of results.
# --max-downloads: Numbers of ID youtube-dl will try to download before it gives up for each hit (default is 1)
@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2014

You don't need downloaded at all. Also, I'm a little bit confused about --max-downloads 10 - do you want to download 10 videos?

@phihag phihag closed this Jan 23, 2014
@davidhedlund
Copy link
Author

@davidhedlund davidhedlund commented Jan 23, 2014

On 2014-01-23 13:47, Philipp Hagemeister wrote:

You don't need |downloaded| at all. Also, I'm a little bit confused
about |--max-downloads 10| - do you want to download 10 videos?


Reply to this email directly or view it on GitHub
#2208 (comment).

I think it would be easiest if we focused on
#2211 specifically

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.