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

Name output file manually #33

Closed
travs opened this issue Jan 5, 2015 · 6 comments
Closed

Name output file manually #33

travs opened this issue Jan 5, 2015 · 6 comments

Comments

@travs
Copy link

travs commented Jan 5, 2015

Something like scdl -l <track_url> -O myFilename.mp3 would be convenient. We can't use -of I guess, because -o and -f are already in use and it would be confusing.

Currently I use scdl in a script, and it would be much easier to do stuff with the downloaded file if I knew what the output filename was going to be.

@flyingrub
Copy link
Owner

this mean that every songs downloaded will have the same filename...
your script can use the scdl stdout output to check the filename.
exemple:

fly@Minotoor ~ $ scdl -l https://soundcloud.com/phanton/phanton-derpinas-short-video
Soundcloud Downloader
Downloading to /home/fly...

Found a track
Downloading Phanton - Derpinas (Short Video Edit)
100% [......................................................] 3719835 / 3719835
Settings tags...

Phanton - Derpinas (Short Video Edit).mp3 Downloaded.

Phanton - Derpinas (Short Video Edit).mp3 is the filename

@travs
Copy link
Author

travs commented Jan 6, 2015

Good point.

This is what I currently do:

scdl -l <track> | grep "Downloaded" | rev | cut -c 13- | rev;

Which is painful. Could use awk or something I guess.

Maybe if the trackname was alone on the final line it would be ok, but then if there are multiple files it would still be a problem...

Anyway

@flyingrub
Copy link
Owner

I will try something later ;)

@flyingrub
Copy link
Owner

just something : why don't you just check for track in your folder and then use them in your script ?

@travs
Copy link
Author

travs commented Jan 15, 2015

You mean wait for a file to be created then act on it? I do not know how to do that in bash, but I will look into it.

@flyingrub
Copy link
Owner

for f in *.mp3
do
    #do something with the filename $f.
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants