mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
2020-02-07 Fred Gleason <fredg@paravelsystems.com>
* Tweaked the CD rippers to display the 'hourglass' icon appropriately.
This commit is contained in:
parent
0344db5fee
commit
c102a3f32e
@ -19526,3 +19526,6 @@
|
||||
* Added '--set-string-isci' switch to rdimport(1).
|
||||
* Added support for the '%wc' wildcard to the '--metadata-pattern='
|
||||
switch in rdexport(1).
|
||||
2020-02-07 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Tweaked the CD rippers to display the 'hourglass' icon
|
||||
appropriately.
|
||||
|
@ -21,11 +21,14 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <qtimer.h>
|
||||
#include <qregexp.h>
|
||||
#include <qdatetime.h>
|
||||
|
||||
#include <q3process.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qregexp.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdcddblookup.h"
|
||||
#include "rdprofile.h"
|
||||
@ -62,6 +65,8 @@ QString RDCddbLookup::sourceName() const
|
||||
|
||||
void RDCddbLookup::lookupRecord()
|
||||
{
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
lookup_username=rda->user()->name();
|
||||
lookup_hostname=rda->libraryConf()->cddbServer();
|
||||
lookup_appname="rivendell";
|
||||
@ -183,7 +188,9 @@ void RDCddbLookup::readyReadData()
|
||||
case 4: // Process Multiple Matches
|
||||
if(line.trimmed()==".") {
|
||||
profile("Match list complete, showing chooser dialog...");
|
||||
QApplication::restoreOverrideCursor();
|
||||
if((index_line=exec())>=0) {
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
f0=titlesKey()->at(index_line).split(" ",QString::SkipEmptyParts);
|
||||
if(f0.size()!=2) {
|
||||
FinishCddbLookup(RDCddbLookup::LookupError,
|
||||
@ -288,6 +295,7 @@ void RDCddbLookup::errorData(QAbstractSocket::SocketError err)
|
||||
break;
|
||||
}
|
||||
lookup_state=0;
|
||||
QApplication::restoreOverrideCursor();
|
||||
emit lookupDone(RDCddbLookup::LookupError,err_msg);
|
||||
}
|
||||
|
||||
@ -298,6 +306,7 @@ void RDCddbLookup::FinishCddbLookup(RDCddbLookup::Result res,
|
||||
SendToServer("quit");
|
||||
lookup_socket->close();
|
||||
lookup_state=0;
|
||||
QApplication::restoreOverrideCursor();
|
||||
emit lookupDone(res,err_msg);
|
||||
profile("CDDB lookup finished");
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <q3process.h>
|
||||
@ -96,6 +97,7 @@ void RDDiscLookup::lookup()
|
||||
//
|
||||
// Get some basic disc parameters,
|
||||
//
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
DiscId *disc=discid_new();
|
||||
if(discid_read_sparse(disc,rda->libraryConf()->ripperDevice().toUtf8(),0)==0) {
|
||||
QMessageBox::warning(this,caption()+" - "+tr("Error"),
|
||||
@ -107,6 +109,7 @@ void RDDiscLookup::lookup()
|
||||
discRecord()->setDiscId(QString(discid_get_freedb_id(disc)).toUInt(NULL,16));
|
||||
discRecord()->setDiscMbId(discid_get_id(disc));
|
||||
discRecord()->setMbSubmissionUrl(discid_get_submission_url(disc));
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
//
|
||||
// Call the low-level driver to do its lookup.
|
||||
@ -120,6 +123,7 @@ void RDDiscLookup::lookup()
|
||||
// WARNING: This operation can be VERY expensive if the disc does not in
|
||||
// fact contain ISRCs!
|
||||
//
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
if((!discRecord()->hasIsrcs())&&rda->libraryConf()->readIsrc()) {
|
||||
if(discid_read(disc,rda->libraryConf()->ripperDevice().toUtf8())==0) {
|
||||
QMessageBox::warning(this,caption()+" - "+tr("Error"),
|
||||
@ -138,6 +142,7 @@ void RDDiscLookup::lookup()
|
||||
}
|
||||
}
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
discid_free(disc);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <musicbrainz5/RelationListList.h>
|
||||
#include <musicbrainz5/Track.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qdir.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qpixmap.h>
|
||||
@ -133,6 +134,8 @@ QString RDMbLookup::sourceUrl() const
|
||||
|
||||
void RDMbLookup::lookupRecord()
|
||||
{
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
MusicBrainz5::CQuery
|
||||
mbq((const char *)(QString("rivendell-")+VERSION).toUtf8(),
|
||||
(const char *)rda->libraryConf()->mbServer().toUtf8());
|
||||
@ -169,10 +172,13 @@ void RDMbLookup::lookupRecord()
|
||||
titlesKey()->push_back(QString::fromUtf8(release->Title().c_str()));
|
||||
titlesBox()->insertItem(titlesBox()->count(),GetReleaseCover(QString::fromUtf8(release->ID().c_str())),title);
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
if((index=exec())>=0) {
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
result_code=ProcessRelease(releases->Item(index));
|
||||
}
|
||||
else {
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
result_code=RDDiscLookup::NoMatch;
|
||||
}
|
||||
}
|
||||
@ -239,6 +245,7 @@ void RDMbLookup::lookupRecord()
|
||||
QString::fromUtf8(mbq.LastErrorMessage().c_str());
|
||||
result_code=RDDiscLookup::NoMatch;
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
emit lookupDone(result_code,err_str);
|
||||
}
|
||||
|
||||
|
@ -752,9 +752,6 @@ void DiskRipper::mediaChangedData()
|
||||
{
|
||||
RDListViewItem *l;
|
||||
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
// rip_isrc_read=false;
|
||||
rip_cutnames.clear();
|
||||
rip_end_track.clear();
|
||||
for(unsigned i=0;i<rip_wave_datas.size();i++) {
|
||||
@ -786,9 +783,8 @@ void DiskRipper::mediaChangedData()
|
||||
rip_disc_record.clear();
|
||||
rip_cdrom->setCddbRecord(&rip_disc_record);
|
||||
rip_disc_lookup->setCddbRecord(&rip_disc_record);
|
||||
rip_disc_lookup->lookup();
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
rip_disc_lookup->lookup();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user