Allow autotagging for non-library music files. Fixes issue 1389

This commit is contained in:
Arnaud Bienner 2011-01-29 16:02:23 +00:00
parent 6c42240b02
commit 8b681a5dd2

@ -74,6 +74,7 @@ EditTagDialog::EditTagDialog(QWidget* parent)
#ifdef HAVE_LIBTUNEPIMP #ifdef HAVE_LIBTUNEPIMP
ui_->fetch_tag->setText(tr(kTagFetchText)); ui_->fetch_tag->setText(tr(kTagFetchText));
#else #else
ui_->fetch_tag->setDisabled(true);
ui_->fetch_tag->setVisible(false); ui_->fetch_tag->setVisible(false);
#endif #endif
@ -687,7 +688,7 @@ void EditTagDialog::FetchTag() {
if (sel.isEmpty()) if (sel.isEmpty())
return; return;
Song* song = &data_[sel.first().row()].original_; Song* song = &data_[sel.first().row()].original_;
if (!song->is_valid() || song->id() == -1) if (!song->is_valid())
return; return;
tag_fetcher_->FetchFromFile(song->filename()); tag_fetcher_->FetchFromFile(song->filename());
ui_->fetch_tag->setDisabled(true); // disable button, will be re-enabled later ui_->fetch_tag->setDisabled(true); // disable button, will be re-enabled later