abhimanyuPathania / lyrico

A python based command-line lyrics downloader
https://pypi.python.org/pypi/lyrico
Other
15 stars 6 forks source link

Do not require source_dir to be set #4

Closed cweiske closed 8 years ago

cweiske commented 8 years ago

I don't want to configure lyrico, I just want to run it on a folder of music files, fetch and store the lyrics in the meta data tags.

Currently this is not possible; it complains that source_dir is not set even when I pass a directory:

$ lyrico Bell\ Book\ \&\ Candle/Read\ My\ Sign/
source_dir is not set. Please use the "set" command to set source_dir.
use "lyrico --help" to view commands.
abhimanyuPathania commented 8 years ago

Did this happen on the very first run of lyrico after installation?

When you run lyrico the very first time; you have explicitly set the source_dir and lyrics_dir using the set command. The short command, lyrico path_to_source_dir, will also not work the first time. This setup needs to be done only once.

cweiske commented 8 years ago

I know that lyrico currently requires me to set those two directories.

I find that inconvenient and ask you to not require that.

abhimanyuPathania commented 8 years ago

Will not work. I validate the config.ini before processing any command-line arguments and if source_dir and lyrics_dir are not set, the config is invalid.

Also, since save_to_tag is disabled by default; you will have to setup your config anyways, might as well set the directories then.

cweiske commented 8 years ago

Also, since save_to_tag is disabled by default; you will have to setup your config anyways, might as well set the directories then.

An cli option to change this behavior (or set the lyrics dir via cli option) would be required then, too.


It seems I expect from this program something different than you. You require all to be configured before running, while I see the configuration file as something optional and that I should be able to configure everything by command line parameters.

If you don't indent to add command line options, then please close this issue.

abhimanyuPathania commented 8 years ago

Originally it was supposed only to save the lyrics as files. Because the music player I am using (foobar) can read those directly using the naming convention for the lyrics files.

save_to_tag was added later. But on saving tags, mutagen(underlying dependency used to read song metadata) updates older ID3 tags to ID3v2.4 for mp3 and similarly makes some other subtle changes for different formats. Then, there are also issues with unicode and metadata. The standards for saving metadata across different audio formats is a mess.

These never caused any problems while testing but, with lyrico and save_to_tag you can update thousands of tags within minutes. So in order to keep your music library absolutely safe; this is how I use it:

  1. Create a separate folder and set the same to source_dir and lyrics_dir; both.
  2. Copy the album for which I want to download lyrics into that folder. I use it for one album at a time.
  3. Run the command lyrico to download lyrics.
  4. Check files/tags.
  5. Replace the album in the music library with one from source_dir if tags were updated.

This was the intended idea. Although the way you say it also makes sense.