Browse Source
2020-01-30 Fred Gleason <fredg@paravelsystems.com>
2020-01-30 Fred Gleason <fredg@paravelsystems.com>
* Renamed the 'RDCddbRecord' class to 'RDDiscRecord'. * Removed support for CD-TEXT from the CD rippers. * Removed the icedax(1) dependency.pull/537/head
30 changed files with 722 additions and 524 deletions
-
4ChangeLog
-
4INSTALL
-
3configure.ac
-
2importers/Makefile.am
-
2lib/Makefile.am
-
8lib/lib.pro
-
23lib/librd_cs.ts
-
23lib/librd_de.ts
-
23lib/librd_es.ts
-
23lib/librd_fr.ts
-
23lib/librd_nb.ts
-
23lib/librd_nn.ts
-
23lib/librd_pt_BR.ts
-
12lib/rdcddblookup.cpp
-
11lib/rdcddblookup.h
-
278lib/rdcddbrecord.cpp
-
4lib/rdcdplayer.cpp
-
6lib/rdcdplayer.h
-
37lib/rdcut.cpp
-
267lib/rddisclookup.cpp
-
22lib/rddisclookup.h
-
314lib/rddiscrecord.cpp
-
61lib/rddiscrecord.h
-
2rdlibrary/audio_cart.cpp
-
10rdlibrary/cdripper.cpp
-
7rdlibrary/cdripper.h
-
6rdlibrary/disk_ripper.cpp
-
4rdlibrary/disk_ripper.h
-
2rivendell.spec.in
-
19tests/readcd_test.cpp
@ -1,278 +0,0 @@ |
|||
// rdcddbrecord.cpp
|
|||
//
|
|||
// A Container Class for CDDB Data.
|
|||
//
|
|||
// (C) Copyright 2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
|||
//
|
|||
// This program is free software; you can redistribute it and/or modify
|
|||
// it under the terms of the GNU Library General Public License
|
|||
// version 2 as published by the Free Software Foundation.
|
|||
//
|
|||
// This program is distributed in the hope that it will be useful,
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
// GNU General Public License for more details.
|
|||
//
|
|||
// You should have received a copy of the GNU General Public
|
|||
// License along with this program; if not, write to the Free Software
|
|||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|||
//
|
|||
|
|||
#include <rdcddbrecord.h>
|
|||
|
|||
RDCddbRecord::RDCddbRecord() |
|||
{ |
|||
clear(); |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::clear() |
|||
{ |
|||
cddb_tracks=0; |
|||
cddb_disc_id=0; |
|||
cddb_disc_length=0; |
|||
cddb_disc_title=""; |
|||
cddb_disc_artist=""; |
|||
cddb_disc_album=""; |
|||
cddb_disc_author=""; |
|||
cddb_disc_year=0; |
|||
cddb_disc_genre=""; |
|||
cddb_disc_extended=""; |
|||
cddb_disc_playorder=""; |
|||
for(int i=0;i<CDROM_LEADOUT;i++) { |
|||
cddb_track_title[i]=""; |
|||
cddb_track_extended[i]=""; |
|||
cddb_track_artist[i]=""; |
|||
cddb_track_isrc[i]=""; |
|||
cddb_track_offset[i]=0; |
|||
} |
|||
} |
|||
|
|||
|
|||
int RDCddbRecord::tracks() const |
|||
{ |
|||
return cddb_tracks; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setTracks(int num) |
|||
{ |
|||
cddb_tracks=num; |
|||
} |
|||
|
|||
|
|||
unsigned RDCddbRecord::discLength() const |
|||
{ |
|||
return cddb_disc_length; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscLength(unsigned len) |
|||
{ |
|||
cddb_disc_length=len; |
|||
} |
|||
|
|||
|
|||
unsigned RDCddbRecord::discId() const |
|||
{ |
|||
return cddb_disc_id; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscId(unsigned id) |
|||
{ |
|||
cddb_disc_id=id; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discTitle() const |
|||
{ |
|||
return cddb_disc_title; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscTitle(QString title) |
|||
{ |
|||
int n; |
|||
|
|||
cddb_disc_title=title; |
|||
if((n=title.find(" / "))!=-1) { |
|||
cddb_disc_artist=title.left(n); |
|||
cddb_disc_album=title.right(title.length()-n-3); |
|||
cddb_disc_author=""; |
|||
} |
|||
else { |
|||
cddb_disc_album=title; |
|||
cddb_disc_artist=title; |
|||
cddb_disc_author=""; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discArtist() const |
|||
{ |
|||
return cddb_disc_artist; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscArtist(QString artist) |
|||
{ |
|||
cddb_disc_artist=artist; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discAlbum() const |
|||
{ |
|||
return cddb_disc_album; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscAlbum(QString album) |
|||
{ |
|||
cddb_disc_album=album; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discAuthor() const |
|||
{ |
|||
return cddb_disc_author; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscAuthor(QString author) |
|||
{ |
|||
cddb_disc_author=author; |
|||
} |
|||
|
|||
|
|||
unsigned RDCddbRecord::discYear() const |
|||
{ |
|||
return cddb_disc_year; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscYear(unsigned year) |
|||
{ |
|||
cddb_disc_year=year; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discGenre() const |
|||
{ |
|||
return cddb_disc_genre; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscGenre(QString genre) |
|||
{ |
|||
cddb_disc_genre=genre; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discExtended() const |
|||
{ |
|||
return cddb_disc_extended; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscExtended(QString text) |
|||
{ |
|||
cddb_disc_extended=text; |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::discPlayOrder() const |
|||
{ |
|||
return cddb_disc_playorder; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setDiscPlayOrder(QString order) |
|||
{ |
|||
cddb_disc_playorder=order; |
|||
} |
|||
|
|||
|
|||
unsigned RDCddbRecord::trackOffset(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return cddb_track_offset[track]; |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setTrackOffset(int track,unsigned frames) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
cddb_track_offset[track]=frames; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::trackTitle(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return cddb_track_title[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setTrackTitle(int track,QString title) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
cddb_track_title[track]=title; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::trackExtended(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return cddb_track_extended[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setTrackExtended(int track,QString text) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
cddb_track_extended[track]=text; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::trackArtist(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return cddb_track_artist[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setTrackArtist(int track,QString artist) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
cddb_track_artist[track]=artist; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDCddbRecord::isrc(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return cddb_track_isrc[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDCddbRecord::setIsrc(int track,QString isrc) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
cddb_track_isrc[track]=isrc; |
|||
} |
|||
} |
@ -0,0 +1,314 @@ |
|||
// rddiscrecord.cpp
|
|||
//
|
|||
// Container Class for Compact Disc Metadata
|
|||
//
|
|||
// (C) Copyright 2003-2020 Fred Gleason <fredg@paravelsystems.com>
|
|||
//
|
|||
// This program is free software; you can redistribute it and/or modify
|
|||
// it under the terms of the GNU Library General Public License
|
|||
// version 2 as published by the Free Software Foundation.
|
|||
//
|
|||
// This program is distributed in the hope that it will be useful,
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
// GNU General Public License for more details.
|
|||
//
|
|||
// You should have received a copy of the GNU General Public
|
|||
// License along with this program; if not, write to the Free Software
|
|||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|||
//
|
|||
|
|||
#include "rddiscrecord.h"
|
|||
|
|||
RDDiscRecord::RDDiscRecord() |
|||
{ |
|||
clear(); |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::clear() |
|||
{ |
|||
disc_tracks=0; |
|||
disc_disc_id=0; |
|||
disc_disc_length=0; |
|||
disc_disc_title=""; |
|||
disc_disc_artist=""; |
|||
disc_disc_album=""; |
|||
disc_disc_author=""; |
|||
disc_disc_year=0; |
|||
disc_disc_genre=""; |
|||
disc_disc_extended=""; |
|||
disc_disc_playorder=""; |
|||
for(int i=0;i<CDROM_LEADOUT;i++) { |
|||
disc_track_title[i]=""; |
|||
disc_track_extended[i]=""; |
|||
disc_track_artist[i]=""; |
|||
disc_track_isrc[i]=""; |
|||
disc_track_offset[i]=0; |
|||
} |
|||
} |
|||
|
|||
|
|||
int RDDiscRecord::tracks() const |
|||
{ |
|||
return disc_tracks; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setTracks(int num) |
|||
{ |
|||
disc_tracks=num; |
|||
} |
|||
|
|||
|
|||
unsigned RDDiscRecord::discLength() const |
|||
{ |
|||
return disc_disc_length; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscLength(unsigned len) |
|||
{ |
|||
disc_disc_length=len; |
|||
} |
|||
|
|||
|
|||
unsigned RDDiscRecord::discId() const |
|||
{ |
|||
return disc_disc_id; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscId(unsigned id) |
|||
{ |
|||
disc_disc_id=id; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::mcn() const |
|||
{ |
|||
return disc_mcn; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setMcn(const QString &mcn) |
|||
{ |
|||
disc_mcn=mcn; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::mbID() const |
|||
{ |
|||
return disc_mb_id; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setMbId(const QString &str) |
|||
{ |
|||
disc_mb_id=str; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::mbSubmissionUrl() const |
|||
{ |
|||
return disc_mb_submission_url; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setMbSubmissionUrl(const QString &url) |
|||
{ |
|||
disc_mb_submission_url=url; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discTitle() const |
|||
{ |
|||
return disc_disc_title; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscTitle(QString title) |
|||
{ |
|||
int n; |
|||
|
|||
disc_disc_title=title; |
|||
if((n=title.find(" / "))!=-1) { |
|||
disc_disc_artist=title.left(n); |
|||
disc_disc_album=title.right(title.length()-n-3); |
|||
disc_disc_author=""; |
|||
} |
|||
else { |
|||
disc_disc_album=title; |
|||
disc_disc_artist=title; |
|||
disc_disc_author=""; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discArtist() const |
|||
{ |
|||
return disc_disc_artist; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscArtist(QString artist) |
|||
{ |
|||
disc_disc_artist=artist; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discAlbum() const |
|||
{ |
|||
return disc_disc_album; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscAlbum(QString album) |
|||
{ |
|||
disc_disc_album=album; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discAuthor() const |
|||
{ |
|||
return disc_disc_author; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscAuthor(QString author) |
|||
{ |
|||
disc_disc_author=author; |
|||
} |
|||
|
|||
|
|||
unsigned RDDiscRecord::discYear() const |
|||
{ |
|||
return disc_disc_year; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscYear(unsigned year) |
|||
{ |
|||
disc_disc_year=year; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discGenre() const |
|||
{ |
|||
return disc_disc_genre; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscGenre(QString genre) |
|||
{ |
|||
disc_disc_genre=genre; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discExtended() const |
|||
{ |
|||
return disc_disc_extended; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscExtended(QString text) |
|||
{ |
|||
disc_disc_extended=text; |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::discPlayOrder() const |
|||
{ |
|||
return disc_disc_playorder; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setDiscPlayOrder(QString order) |
|||
{ |
|||
disc_disc_playorder=order; |
|||
} |
|||
|
|||
|
|||
unsigned RDDiscRecord::trackOffset(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return disc_track_offset[track]; |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setTrackOffset(int track,unsigned frames) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
disc_track_offset[track]=frames; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::trackTitle(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return disc_track_title[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setTrackTitle(int track,QString title) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
disc_track_title[track]=title; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::trackExtended(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return disc_track_extended[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setTrackExtended(int track,QString text) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
disc_track_extended[track]=text; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::trackArtist(int track) const |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
return disc_track_artist[track]; |
|||
} |
|||
return QString(); |
|||
} |
|||
|
|||
|
|||
void RDDiscRecord::setTrackArtist(int track,QString artist) |
|||
{ |
|||
if(track<CDROM_LEADOUT) { |
|||
disc_track_artist[track]=artist; |
|||
} |
|||
} |
|||
|
|||
|
|||
QString RDDiscRecord::isrc |