mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01: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:
@@ -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()));
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user