deepjyoti30 / ytmdl

A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
https://ytmdl.deepjyoti30.dev
MIT License
3.21k stars 164 forks source link

Download file if meta is not found instead of erroring out quietly #155

Closed metruzanca closed 3 years ago

metruzanca commented 3 years ago

Feature Request

Checklist

Description

Currently, if you search for an obscure artist e.g.

ytmdl Celldweller - The Lucky One --artist "Celldweller" --album "Wish Upon a Blackstar"`

After attempting to find meta and not finding it. You get

 ==> Getting song data for Celldweller the lucky one... 
 ==> No metadata found for `Celldweller the lucky one`. Pass `--ignore-errors` to ignore this.

Passing --ignore-errors changes nothing, it just won't show the error line. It would be nice if it there was a flag to pass that makes it default to manual meta insertion if no meta was found.

Would also be nice to have a flag that just downloads the track if no meta was found and doesn't ask for manual insertion.

Compared to yt-dl this cli has the ability to natively bulk download tracks, which is nice so having these two options IMO would be very beneficial.

TL;DR; Add two flags, both act as fallbacks after no meta was found. The first will prompt for manual input, the second saves the file as-is.

deepjyoti30 commented 3 years ago

@metruzanca I understand the issue. I personally had been thinking that rather than showing the error, it should ask the user if they'd like to go for manual metadata or skip it as a matter of fact. I will take a look into what can be done!

metruzanca commented 3 years ago

@deepjyoti30 Awesome! I look forward to it!

Really nice CLI you've made here btw. (came from r/unixporn)

deepjyoti30 commented 3 years ago

@metruzanca I added a new flag named on-meta-error that allows three values: exit, manual or skip. The flag, as the name suggests tells ytmdl what to do if the metadata step fails.

By default it is set to exit which means it will do nothing and just exit. manual takes the user to interactive mode if metadata fails skip just copies the audio file with no metadata if metadata fails.

This flag can also be handled by the config. Consider taking a look at the example config

You can try out the latest commits from the unstable branch and report back here if you face any issues.

deepjyoti30 commented 3 years ago

Added in the latest release