mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-25 08:56:00 +02:00
2020-02-02 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the full disc ripper in rdlibrary(1)that caused it to fail to save MBIDs to the database after a successful rip. * Fixed a bug in the disc track ripper in rdlibrary(1)that caused it to fail to save MBIDs to the database after a successful rip.
This commit is contained in:
parent
1e207e7e0a
commit
32a3e34c6e
@ -19459,3 +19459,8 @@
|
||||
* Added a 'CUTS.RELEASE_MBID' field to the database.
|
||||
2020-02-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'MusicBrainz' CD metadata lookup method in 'RDMbLookup'.
|
||||
2020-02-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the full disc ripper in rdlibrary(1)that caused it
|
||||
to fail to save MBIDs to the database after a successful rip.
|
||||
* Fixed a bug in the disc track ripper in rdlibrary(1)that caused it
|
||||
to fail to save MBIDs to the database after a successful rip.
|
||||
|
@ -239,6 +239,30 @@ QString RDCut::isci() const
|
||||
}
|
||||
|
||||
|
||||
QString RDCut::trackMbId() const
|
||||
{
|
||||
return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"TRACK_MBID").toString();
|
||||
}
|
||||
|
||||
|
||||
void RDCut::setTrackMbId(const QString &mbid)
|
||||
{
|
||||
SetRow("TRACK_MBID",mbid);
|
||||
}
|
||||
|
||||
|
||||
QString RDCut::releaseMbId() const
|
||||
{
|
||||
return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"RELEASE_MBID").toString();
|
||||
}
|
||||
|
||||
|
||||
void RDCut::setReleaseMbId(const QString &mbid)
|
||||
{
|
||||
SetRow("RELEASE_MBID",mbid);
|
||||
}
|
||||
|
||||
|
||||
void RDCut::setIsci(const QString &isci) const
|
||||
{
|
||||
SetRow("ISCI",isci);
|
||||
|
@ -59,6 +59,10 @@ class RDCut
|
||||
void setIsrc(const QString &isrc) const;
|
||||
QString isci() const;
|
||||
void setIsci(const QString &isci) const;
|
||||
QString trackMbId() const;
|
||||
void setTrackMbId(const QString &mbid);
|
||||
QString releaseMbId() const;
|
||||
void setReleaseMbId(const QString &mbid);
|
||||
QString sha1Hash() const;
|
||||
void setSha1Hash(const QString &str);
|
||||
unsigned length() const;
|
||||
|
@ -109,6 +109,18 @@ void RDDiscRecord::setDiscMbId(const QString &str)
|
||||
}
|
||||
|
||||
|
||||
QString RDDiscRecord::discReleaseMbId() const
|
||||
{
|
||||
return disc_disc_release_mb_id;
|
||||
}
|
||||
|
||||
|
||||
void RDDiscRecord::setDiscReleaseMbId(const QString &mbid)
|
||||
{
|
||||
disc_disc_release_mb_id=mbid;
|
||||
}
|
||||
|
||||
|
||||
QString RDDiscRecord::mbSubmissionUrl() const
|
||||
{
|
||||
return disc_mb_submission_url;
|
||||
|
@ -49,6 +49,8 @@ class RDDiscRecord
|
||||
void setMcn(const QString &mcn);
|
||||
QString discMbId() const;
|
||||
void setDiscMbId(const QString &str);
|
||||
QString discReleaseMbId() const;
|
||||
void setDiscReleaseMbId(const QString &mbid);
|
||||
QString mbSubmissionUrl() const;
|
||||
void setMbSubmissionUrl(const QString &url);
|
||||
QString discTitle() const;
|
||||
@ -88,6 +90,7 @@ class RDDiscRecord
|
||||
unsigned disc_disc_id;
|
||||
QString disc_mcn;
|
||||
QString disc_disc_mb_id;
|
||||
QString disc_disc_release_mb_id;
|
||||
QString disc_mb_submission_url;
|
||||
unsigned disc_disc_length;
|
||||
QString disc_disc_title;
|
||||
|
@ -154,6 +154,7 @@ RDDiscLookup::Result RDMbLookup::ProcessRelease(MusicBrainz5::CRelease *release)
|
||||
//
|
||||
// Extract Basic Release Data
|
||||
//
|
||||
discRecord()->setDiscReleaseMbId(QString::fromUtf8(release->ID().c_str()));
|
||||
discRecord()->setDiscAlbum(QString::fromUtf8(release->Title().c_str()));
|
||||
//discRecord()->setDiscGenre();
|
||||
QStringList f0=QString::fromUtf8(release->Date().c_str()).split("-");
|
||||
@ -184,13 +185,10 @@ RDDiscLookup::Result RDMbLookup::ProcessRelease(MusicBrainz5::CRelease *release)
|
||||
//
|
||||
// Get Labels
|
||||
//
|
||||
MusicBrainz5::CLabelInfoList *labels=
|
||||
metadata.Release()->LabelInfoList();
|
||||
MusicBrainz5::CLabelInfoList *labels=metadata.Release()->LabelInfoList();
|
||||
if(labels) {
|
||||
std::cout << *labels << std::endl;
|
||||
discRecord()->
|
||||
setDiscLabel(QString::fromUtf8(labels->Item(0)->
|
||||
Label()->Name().c_str()));
|
||||
discRecord()->setDiscLabel(QString::fromUtf8(labels->Item(0)->
|
||||
Label()->Name().c_str()));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -565,6 +565,8 @@ void AudioCart::ripCutData()
|
||||
rdcart_controls->album_edit->setText(album);
|
||||
RDCut *cut=new RDCut(cutname);
|
||||
cut->setIsrc(rec->isrc(track));
|
||||
cut->setTrackMbId(rec->trackMbId(track));
|
||||
cut->setReleaseMbId(rec->discReleaseMbId());
|
||||
delete cut;
|
||||
}
|
||||
if(cut_clipboard==NULL) {
|
||||
|
@ -1032,6 +1032,8 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
cart->setMetadata(rip_wave_datas[track-1]);
|
||||
cut->setDescription(rip_wave_datas[track-1]->title());
|
||||
cut->setIsrc(rip_disc_record.isrc(rip_track_number-1));
|
||||
cut->setTrackMbId(rip_disc_record.trackMbId(rip_track_number-1));
|
||||
cut->setReleaseMbId(rip_disc_record.discReleaseMbId());
|
||||
cart->clearPending();
|
||||
SendNotification(RDNotification::AddAction,cart->number());
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user