From 5e21be39ea2c12f2953fb4c2c47dd0c4b99794d6 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 15:41:13 -0400 Subject: [PATCH 1/8] 2019-08-31 Fred Gleason * Updated ripper profiling code in rdlibrary(1) to be UTF-8 clean. --- ChangeLog | 2 ++ lib/rdcddblookup.cpp | 4 ++-- lib/rdcdplayer.cpp | 4 ++-- lib/rdcdripper.cpp | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a7931df..b32a750b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19051,3 +19051,5 @@ 2019-08-29 Patrick Linstruth * Modified rdlibrary(1) Rip Disk dialog to use Artist and Album text fields when modifying cart labels. +2019-08-31 Fred Gleason + * Updated ripper profiling code in rdlibrary(1) to be UTF-8 clean. diff --git a/lib/rdcddblookup.cpp b/lib/rdcddblookup.cpp index 6810c52f..610f5b94 100644 --- a/lib/rdcddblookup.cpp +++ b/lib/rdcddblookup.cpp @@ -2,7 +2,7 @@ // // A Qt class for accessing the FreeDB CD Database. // -// (C) Copyright 2003,2016 Fred Gleason +// (C) Copyright 2003-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -458,6 +458,6 @@ void RDCddbLookup::Profile(const QString &msg) if(lookup_profile_msgs!=NULL) { printf("%s | RDCddbLookup::%s\n", (const char *)QTime::currentTime().toString("hh:mm:ss.zzz"), - (const char *)msg); + (const char *)msg.toUtf8()); } } diff --git a/lib/rdcdplayer.cpp b/lib/rdcdplayer.cpp index 521ddf4a..2d1617a8 100644 --- a/lib/rdcdplayer.cpp +++ b/lib/rdcdplayer.cpp @@ -2,7 +2,7 @@ // // Abstract a Linux CDROM Device. // -// (C) Copyright 2002-2003,2016 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -550,7 +550,7 @@ void RDCdPlayer::Profile(const QString &msg) if(cdrom_profile_msgs!=NULL) { fprintf(cdrom_profile_msgs,"%s | RDCdPlayer::%s\n", (const char *)QTime::currentTime().toString("hh:mm:ss.zzz"), - (const char *)msg); + (const char *)msg.toUtf8()); } } diff --git a/lib/rdcdripper.cpp b/lib/rdcdripper.cpp index d439daa9..444c5b5a 100644 --- a/lib/rdcdripper.cpp +++ b/lib/rdcdripper.cpp @@ -2,7 +2,7 @@ // // Rip an audio from from CD // -// (C) Copyright 2010,2016 Fred Gleason +// (C) Copyright 2010-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -198,6 +198,6 @@ void RDCdRipper::Profile(const QString &msg) if(conv_profile_msgs!=NULL) { fprintf(conv_profile_msgs,"%s | RDCdPlayer::%s\n", (const char *)QTime::currentTime().toString("hh:mm:ss.zzz"), - (const char *)msg); + (const char *)msg.toUtf8()); } } From 48d58229af569b084e77978a76a19859e92d524a Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 19:00:20 -0400 Subject: [PATCH 2/8] 2019-08-31 Fred Gleason * Refactored 'RDCddbLookup' to use CDDB protocol level 6. --- ChangeLog | 2 + lib/librd_cs.ts | 19 ++++++ lib/librd_de.ts | 19 ++++++ lib/librd_es.ts | 19 ++++++ lib/librd_fr.ts | 19 ++++++ lib/librd_nb.ts | 19 ++++++ lib/librd_nn.ts | 19 ++++++ lib/librd_pt_BR.ts | 19 ++++++ lib/rdcddblookup.cpp | 134 ++++++++++++++++++++++++++++++++++---- lib/rdcddblookup.h | 62 +++++++++++------- rdlibrary/cdripper.cpp | 6 +- rdlibrary/disk_ripper.cpp | 6 +- 12 files changed, 302 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index b32a750b..8cdd421b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19053,3 +19053,5 @@ text fields when modifying cart labels. 2019-08-31 Fred Gleason * Updated ripper profiling code in rdlibrary(1) to be UTF-8 clean. +2019-08-31 Fred Gleason + * Refactored 'RDCddbLookup' to use CDDB protocol level 6. diff --git a/lib/librd_cs.ts b/lib/librd_cs.ts index 7e659054..5e3a5c13 100644 --- a/lib/librd_cs.ts +++ b/lib/librd_cs.ts @@ -1218,6 +1218,25 @@ ze &souboru Konec + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + OK + + + Cancel + Zrušit + + RDCueEdit diff --git a/lib/librd_de.ts b/lib/librd_de.ts index efcc9b6b..16b5bd26 100644 --- a/lib/librd_de.ts +++ b/lib/librd_de.ts @@ -1209,6 +1209,25 @@ senden Ende + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + OK + + + Cancel + Abbrechen + + RDCueEdit diff --git a/lib/librd_es.ts b/lib/librd_es.ts index d713eab3..cd065c63 100644 --- a/lib/librd_es.ts +++ b/lib/librd_es.ts @@ -1209,6 +1209,25 @@ Color Final + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + + + + Cancel + Cancelar + + RDCueEdit diff --git a/lib/librd_fr.ts b/lib/librd_fr.ts index 61fbf55f..3db0a25a 100644 --- a/lib/librd_fr.ts +++ b/lib/librd_fr.ts @@ -1095,6 +1095,25 @@ La Couleur Fin + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + + + + Cancel + + + RDCueEdit diff --git a/lib/librd_nb.ts b/lib/librd_nb.ts index 3ca46584..79858fc7 100644 --- a/lib/librd_nb.ts +++ b/lib/librd_nb.ts @@ -1208,6 +1208,25 @@ farge Slutten + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + OK + + + Cancel + + + RDCueEdit diff --git a/lib/librd_nn.ts b/lib/librd_nn.ts index 3ca46584..79858fc7 100644 --- a/lib/librd_nn.ts +++ b/lib/librd_nn.ts @@ -1208,6 +1208,25 @@ farge Slutten + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + OK + + + Cancel + + + RDCueEdit diff --git a/lib/librd_pt_BR.ts b/lib/librd_pt_BR.ts index 9e64ab27..ebd44143 100644 --- a/lib/librd_pt_BR.ts +++ b/lib/librd_pt_BR.ts @@ -1209,6 +1209,25 @@ Cor Fim + + RDCddbLookup + + CDDB Query + + + + Multiple Matches Found! + + + + OK + OK + + + Cancel + Cancelar + + RDCueEdit diff --git a/lib/rdcddblookup.cpp b/lib/rdcddblookup.cpp index 610f5b94..5d3aa80f 100644 --- a/lib/rdcddblookup.cpp +++ b/lib/rdcddblookup.cpp @@ -25,13 +25,13 @@ #include #include #include -#include #include #include -RDCddbLookup::RDCddbLookup(FILE *profile_msgs,QObject *parent) - : QObject(parent) +RDCddbLookup::RDCddbLookup(const QString &caption,FILE *profile_msgs, + QWidget *parent) + : QDialog(parent) { lookup_state=0; lookup_profile_msgs=profile_msgs; @@ -46,12 +46,32 @@ RDCddbLookup::RDCddbLookup(FILE *profile_msgs,QObject *parent) lookup_hostname=getenv("HOSTNAME"); } + setWindowTitle(caption+" - "+tr("CDDB Query")); + + QFont label_font("Helvetica",12,QFont::Bold); + label_font.setPixelSize(12); + + lookup_titles_label=new QLabel(tr("Multiple Matches Found!"),this); + lookup_titles_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); + lookup_titles_label->setFont(label_font); + + lookup_titles_box=new QComboBox(this); + + lookup_ok_button=new QPushButton(tr("OK"),this); + lookup_ok_button->setFont(label_font); + connect(lookup_ok_button,SIGNAL(clicked()),this,SLOT(okData())); + + lookup_cancel_button=new QPushButton(tr("Cancel"),this); + lookup_cancel_button->setFont(label_font); + connect(lookup_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); + // // Socket // lookup_socket=new QTcpSocket(this); connect(lookup_socket,SIGNAL(readyRead()),this,SLOT(readyReadData())); - connect(lookup_socket,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(errorData(QAbstractSocket::SocketError))); + connect(lookup_socket,SIGNAL(error(QAbstractSocket::SocketError)), + this,SLOT(errorData(QAbstractSocket::SocketError))); } @@ -61,6 +81,12 @@ RDCddbLookup::~RDCddbLookup() } +QSize RDCddbLookup::sizeHint() const +{ + return QSize(400,120); +} + + void RDCddbLookup::setCddbRecord(RDCddbRecord *rec) { lookup_record=rec; @@ -139,7 +165,7 @@ void RDCddbLookup::readyReadData() while(lookup_socket->canReadLine()) { line=QString::fromUtf8(lookup_socket->readLine()); Profile("recevied from server: \""+line+"\""); - sscanf((const char *)line,"%d",&code); + code=line.split(" ").at(0).toInt(); switch(lookup_state) { case 0: // Login Banner if((code==200)||(code==201)) { @@ -158,6 +184,16 @@ void RDCddbLookup::readyReadData() case 1: // Handshake Response if((code==200)||(code==402)) { + SendToServer("proto 6"); + lookup_state=2; + } + else { + FinishCddbLookup(RDCddbLookup::ProtocolError); + } + break; + + case 2: // Protocol Level Response + if(code==201) { snprintf(buffer,2048,"cddb query %08x %d", lookup_record->discId(),lookup_record->tracks()); for(int i=0;itracks();i++) { @@ -167,14 +203,14 @@ void RDCddbLookup::readyReadData() snprintf(offset,256," %d",lookup_record->discLength()/75); strcat(buffer,offset); SendToServer(buffer); - lookup_state=2; + lookup_state=3; } else { FinishCddbLookup(RDCddbLookup::ProtocolError); } break; - case 2: // Query Response + case 3: // Query Response switch(code) { case 200: // Exact Match f0=line.split(" "); @@ -192,13 +228,19 @@ void RDCddbLookup::readyReadData() (const char *)lookup_record->discGenre().utf8(), lookup_record->discId()); SendToServer(buffer); - lookup_state=3; + lookup_state=5; } else { FinishCddbLookup(RDCddbLookup::ProtocolError); } break; + case 210: // Multiple Exact Matches + lookup_titles_box->clear(); + lookup_titles_key.clear(); + lookup_state=4; + break; + case 211: // Inexact Match FinishCddbLookup(RDCddbLookup::PartialMatch); break; @@ -209,16 +251,58 @@ void RDCddbLookup::readyReadData() } break; - case 3: // Read Response + case 4: // Process Multiple Matches + if(line.trimmed()==".") { + Profile("Match list complete, showing chooser dialog..."); + if(exec()) { + f0=lookup_titles_key.at(lookup_titles_box->currentItem()). + split(" ",QString::SkipEmptyParts); + if(f0.size()!=2) { + FinishCddbLookup(RDCddbLookup::ProtocolError); + } + lookup_record->setDiscId(f0.at(1).toUInt(&ok,16)); + if(!ok) { + FinishCddbLookup(RDCddbLookup::ProtocolError); + } + lookup_record->setDiscGenre(f0.at(0)); + f0=lookup_titles_box->currentText().split("/"); + if(f0.size()==2) { + lookup_record->setDiscTitle(f0.at(1).trimmed()); + } + else { + lookup_record->setDiscTitle(lookup_titles_box->currentText().trimmed()); + } + snprintf(buffer,2048,"cddb read %s %08x\n", + (const char *)lookup_record->discGenre().utf8(), + lookup_record->discId()); + SendToServer(buffer); + lookup_state=5; + } + else { + FinishCddbLookup(RDCddbLookup::NoMatch); + } + } + else { + f0.clear(); + f0=line.split(" "); + lookup_titles_key.push_back(f0.at(0).trimmed()+" "+ + f0.at(1).trimmed()); + f0.removeFirst(); + f0.removeFirst(); + lookup_titles_box->insertItem(lookup_titles_box->count(),f0.join(" ").trimmed()); + } + break; + + case 5: // Read Response if((code==210)) { - lookup_state=4; + lookup_state=6; } else { FinishCddbLookup(RDCddbLookup::ProtocolError); } break; - case 4: // Record Lines + case 6: // Record Lines if(line[0]!='#') { // Ignore Comments if(line[0]=='.') { // Done FinishCddbLookup(RDCddbLookup::ExactMatch); @@ -273,12 +357,38 @@ void RDCddbLookup::errorData(QAbstractSocket::SocketError err) } +void RDCddbLookup::okData() +{ + done(true); +} + + +void RDCddbLookup::cancelData() +{ + done(false); +} + + +void RDCddbLookup::resizeEvent(QResizeEvent *e) +{ + int w=size().width(); + int h=size().height(); + + lookup_titles_label->setGeometry(15,2,w-30,20); + + lookup_titles_box->setGeometry(10,24,w-20,20); + + lookup_ok_button->setGeometry(w-180,h-60,80,50); + lookup_cancel_button->setGeometry(w-90,h-60,80,50); +} + + void RDCddbLookup::FinishCddbLookup(RDCddbLookup::Result res) { SendToServer("quit"); lookup_socket->close(); lookup_state=0; - emit done(res); + emit lookupDone(res); Profile("CDDB lookup finished"); } diff --git a/lib/rdcddblookup.h b/lib/rdcddblookup.h index aa15b1bd..204fc8d0 100644 --- a/lib/rdcddblookup.h +++ b/lib/rdcddblookup.h @@ -2,7 +2,7 @@ // // A Qt class for accessing the FreeDB CD Database. // -// (C) Copyright 2003,2016 Fred Gleason +// (C) Copyright 2003-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -24,9 +24,14 @@ #include -#include +#include +#include +#include +#include +#include #include -#include + +#include "rdcddbrecord.h" // // Default Settings @@ -43,31 +48,37 @@ * database server. **/ -class RDCddbLookup : public QObject +class RDCddbLookup : public QDialog { Q_OBJECT - public: - enum Result {ExactMatch=0,PartialMatch=1,NoMatch=2, - ProtocolError=3,NetworkError=4}; - RDCddbLookup(FILE *profile_msgs,QObject *parent=0); - ~RDCddbLookup(); - void setCddbRecord(RDCddbRecord *); - void lookupRecord(const QString &cdda_dir,const QString &cdda_dev, - const QString &hostname, - Q_UINT16 port=RDCDDBLOOKUP_DEFAULT_PORT, - const QString &username="", - const QString &appname=PACKAGE_NAME, - const QString &ver=VERSION); - bool readIsrc(const QString &cdda_dir,const QString &cdda_dev); + public: + enum Result {ExactMatch=0,PartialMatch=1,NoMatch=2, + ProtocolError=3,NetworkError=4}; + RDCddbLookup(const QString &caption,FILE *profile_msgs,QWidget *parent=0); + ~RDCddbLookup(); + QSize sizeHint() const; + void setCddbRecord(RDCddbRecord *); + void lookupRecord(const QString &cdda_dir,const QString &cdda_dev, + const QString &hostname, + Q_UINT16 port=RDCDDBLOOKUP_DEFAULT_PORT, + const QString &username="", + const QString &appname=PACKAGE_NAME, + const QString &ver=VERSION); + bool readIsrc(const QString &cdda_dir,const QString &cdda_dev); - private slots: - void readyReadData(); - void errorData(QAbstractSocket::SocketError); + private slots: + void readyReadData(); + void errorData(QAbstractSocket::SocketError); + void okData(); + void cancelData(); - signals: - void done(RDCddbLookup::Result); + signals: + void lookupDone(RDCddbLookup::Result); - private: + protected: + void resizeEvent(QResizeEvent *e); + + private: void FinishCddbLookup(RDCddbLookup::Result res); QString DecodeString(QString &str); void ParsePair(QString *line,QString *tag,QString *value,int *index); @@ -76,6 +87,11 @@ class RDCddbLookup : public QObject bool ReadIsrcs(const QString &cdda_dir,const QString &cdda_dev); void SendToServer(const QString &msg); void Profile(const QString &msg); + QLabel *lookup_titles_label; + QComboBox *lookup_titles_box; + QStringList lookup_titles_key; + QPushButton *lookup_ok_button; + QPushButton *lookup_cancel_button; RDCddbRecord *lookup_record; QTcpSocket *lookup_socket; int lookup_state; diff --git a/rdlibrary/cdripper.cpp b/rdlibrary/cdripper.cpp index 82822d9e..56de3598 100644 --- a/rdlibrary/cdripper.cpp +++ b/rdlibrary/cdripper.cpp @@ -124,12 +124,12 @@ CdRipper::CdRipper(QString cutname,RDCddbRecord *rec,RDLibraryConf *conf, // CDDB Stuff // if(rip_profile_rip) { - rip_cddb_lookup=new RDCddbLookup(stdout,this); + rip_cddb_lookup=new RDCddbLookup("RDLibrary",stdout,this); } else { - rip_cddb_lookup=new RDCddbLookup(NULL,this); + rip_cddb_lookup=new RDCddbLookup("RDLibrary",NULL,this); } - connect(rip_cddb_lookup,SIGNAL(done(RDCddbLookup::Result)), + connect(rip_cddb_lookup,SIGNAL(lookupDone(RDCddbLookup::Result)), this,SLOT(cddbDoneData(RDCddbLookup::Result))); // diff --git a/rdlibrary/disk_ripper.cpp b/rdlibrary/disk_ripper.cpp index 7ad9db36..49198a1b 100644 --- a/rdlibrary/disk_ripper.cpp +++ b/rdlibrary/disk_ripper.cpp @@ -119,12 +119,12 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode, // CDDB Stuff // if(rip_profile_rip) { - rip_cddb_lookup=new RDCddbLookup(stdout,this); + rip_cddb_lookup=new RDCddbLookup("RDLibrary",stdout,this); } else { - rip_cddb_lookup=new RDCddbLookup(NULL,this); + rip_cddb_lookup=new RDCddbLookup("RDLibrary",NULL,this); } - connect(rip_cddb_lookup,SIGNAL(done(RDCddbLookup::Result)), + connect(rip_cddb_lookup,SIGNAL(lookupDone(RDCddbLookup::Result)), this,SLOT(cddbDoneData(RDCddbLookup::Result))); // From 0ab0b81068448167f50d01fb0432810523d4ba9b Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 19:19:04 -0400 Subject: [PATCH 3/8] 2019-08-31 Fred Gleason * Fixed a bug in the Disk Ripper in rdlibrary(1) that allowed data tracks to be ripped. --- ChangeLog | 3 +++ rdlibrary/disk_ripper.cpp | 12 ++++++++++-- rdlibrary/disk_ripper.h | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cdd421b..fe90114a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19055,3 +19055,6 @@ * Updated ripper profiling code in rdlibrary(1) to be UTF-8 clean. 2019-08-31 Fred Gleason * Refactored 'RDCddbLookup' to use CDDB protocol level 6. +2019-08-31 Fred Gleason + * Fixed a bug in the Disk Ripper in rdlibrary(1) that allowed + data tracks to be ripped. diff --git a/rdlibrary/disk_ripper.cpp b/rdlibrary/disk_ripper.cpp index 49198a1b..d3f708cb 100644 --- a/rdlibrary/disk_ripper.cpp +++ b/rdlibrary/disk_ripper.cpp @@ -1,8 +1,8 @@ // disk_ripper.cpp // -// CD Ripper Dialog for Rivendell. +// CD Disk Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -904,6 +904,14 @@ void DiskRipper::selectionChangedData() while(item!=NULL) { int track=item->text(0).toInt(); if(item->isSelected()) { + if(item->text(4)==tr("Data Track")) { + rip_setcut_button->setEnabled(false); + rip_setall_button->setEnabled(false); + rip_setsingle_button->setEnabled(false); + rip_cartlabel_button->setEnabled(false); + rip_clear_button->setEnabled(true); + return; + } if(item->id()>0) { FocusSelection(item->id()); rip_setcut_button->setEnabled(false); diff --git a/rdlibrary/disk_ripper.h b/rdlibrary/disk_ripper.h index 822dc8d7..df39b29d 100644 --- a/rdlibrary/disk_ripper.h +++ b/rdlibrary/disk_ripper.h @@ -1,8 +1,8 @@ // disk_ripper.h // -// CD Ripper Dialog for Rivendell +// CD Disk Ripper Dialog for Rivendell // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as From 87431f69b779927de64afdb4a499ddaab17dce0e Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 19:27:20 -0400 Subject: [PATCH 4/8] 2019-08-31 Fred Gleason * Fixed a bug in the CD Track Ripper in rdlibrary(1) that allowed data tracks to be ripped. --- ChangeLog | 3 +++ rdlibrary/cdripper.cpp | 9 ++++++--- rdlibrary/cdripper.h | 3 +-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe90114a..dced7ee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19058,3 +19058,6 @@ 2019-08-31 Fred Gleason * Fixed a bug in the Disk Ripper in rdlibrary(1) that allowed data tracks to be ripped. +2019-08-31 Fred Gleason + * Fixed a bug in the CD Track Ripper in rdlibrary(1) that allowed + data tracks to be ripped. diff --git a/rdlibrary/cdripper.cpp b/rdlibrary/cdripper.cpp index 56de3598..32c5e8af 100644 --- a/rdlibrary/cdripper.cpp +++ b/rdlibrary/cdripper.cpp @@ -1,8 +1,8 @@ // cdripper.cpp // -// CD Ripper Dialog for Rivendell. +// CD Track Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -31,7 +31,6 @@ #include #include #include -//Added by qt3to4: #include #include #include @@ -358,6 +357,10 @@ void CdRipper::trackSelectionChangedData() while(item!=NULL) { if(item->isSelected()) { + if(item->text(4)==tr("Data Track")) { + rip_rip_button->setDisabled(true); + return; + } titles.push_back(item->text(2)); } item=item->nextSibling(); diff --git a/rdlibrary/cdripper.h b/rdlibrary/cdripper.h index 6ac6566e..96cc7165 100644 --- a/rdlibrary/cdripper.h +++ b/rdlibrary/cdripper.h @@ -2,7 +2,7 @@ // // CD Ripper Dialog for Rivendell // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -34,7 +34,6 @@ #include #include #include -//Added by qt3to4: #include #include From e53d844616850cfc3d7c0b4008bc48b555ce18e5 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 20:03:50 -0400 Subject: [PATCH 5/8] 2019-08-31 Fred Gleason * Changed the CD player polling interval ('RDCDPLAYER_CLOCK_INTERVAL') from 100 mS to 1000 mS. --- ChangeLog | 3 +++ lib/rdcdplayer.cpp | 3 +++ lib/rdcdplayer.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dced7ee8..2644cf91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19061,3 +19061,6 @@ 2019-08-31 Fred Gleason * Fixed a bug in the CD Track Ripper in rdlibrary(1) that allowed data tracks to be ripped. +2019-08-31 Fred Gleason + * Changed the CD player polling interval ('RDCDPLAYER_CLOCK_INTERVAL') + from 100 mS to 1000 mS. diff --git a/lib/rdcdplayer.cpp b/lib/rdcdplayer.cpp index 2d1617a8..b3bf2429 100644 --- a/lib/rdcdplayer.cpp +++ b/lib/rdcdplayer.cpp @@ -379,7 +379,9 @@ void RDCdPlayer::clockData() // // Media Status // + Profile("calling ioctl(CDROM_MEDIA_CHANGED)"); if(ioctl(cdrom_fd,CDROM_MEDIA_CHANGED,NULL)==0) { + Profile("ioctl(CDROM_MEDIA_CHANGED) success"); new_state=true; if(cdrom_old_state==false) { Profile("ReadToc() started"); @@ -391,6 +393,7 @@ void RDCdPlayer::clockData() } } else { + Profile("ioctl(CDROM_MEDIA_CHANGED) failure"); new_state=false; if(cdrom_old_state==true) { Profile("emitting ejected()"); diff --git a/lib/rdcdplayer.h b/lib/rdcdplayer.h index cb3ae890..87cf85ca 100644 --- a/lib/rdcdplayer.h +++ b/lib/rdcdplayer.h @@ -33,7 +33,7 @@ // // Driver Settings // -#define RDCDPLAYER_CLOCK_INTERVAL 100 +#define RDCDPLAYER_CLOCK_INTERVAL 1000 #define RDCDPLAYER_BUTTON_DELAY 100 class RDCdPlayer : public QObject From 8dce04e86af36e9fbede584952e4ac64900f8db2 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 20:23:23 -0400 Subject: [PATCH 6/8] 2019-08-31 Fred Gleason * Incremented the package version to 3.0.3int0. --- ChangeLog | 2 ++ NEWS | 40 ++++++++++++++++++++++++++++++++++++++++ PACKAGE_VERSION | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2644cf91..3774ce5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19064,3 +19064,5 @@ 2019-08-31 Fred Gleason * Changed the CD player polling interval ('RDCDPLAYER_CLOCK_INTERVAL') from 100 mS to 1000 mS. +2019-08-31 Fred Gleason + * Incremented the package version to 3.0.3int0. diff --git a/NEWS b/NEWS index 2e3b20e5..5bacac64 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,45 @@ The NEWS file for the Rivendell package. +------------------------------------------------------------------------------- +v3.0.3int0 -- 8/31/2019 + +This is an interrim, limited distribution test release of Rivedell. + +Changes: + Fixed a bug in rdairplay(1) and rdvairplayd(8) where only the first + log machine set to 'load specified log' would do so. + + Fixed a bug in rdlogedit(1) that caused hard start log items + to have the Hour field doubled. + + Refactored the Python 'pypad.Update.shouldBeProcessed()' method + to work correctly when using try: blocks in a PyPAD script. + + Refactored the PyPAD scripts to route updates properly in accordance + with log directives in their configuration file. + + Fixed a bug that broke dropbox logging to individual files. + + Refactored rdalsaconfig(1) to be more robust and intuitive. + + Fixed a bug in caed(8) that broke timescaling support. + + Added a 'pypad_httpget.py' PyPAD script. + + Fixed bugs in rdlibrary(1) that broke CD ripping. + + Updated CDDB code to use protocol level 6 (UTF-8 enabled). + + Added an '%l' wildcard to Filepath Wildcards for 'unpadded month'. + + +Database Update: + This version of Rivendell uses database schema version 309, and will + automatically upgrade any earlier versions. To see the current schema + version prior to upgrade, see RDAdmin->SystemInfo. + + Be sure to run 'rddbmgr --modify' (as root) immediately after upgrading + to allow any necessary changes to the database schema to be applied. ------------------------------------------------------------------------------- v3.0.3 -- 8/5/2019 diff --git a/PACKAGE_VERSION b/PACKAGE_VERSION index 282895a8..6ebb6949 100644 --- a/PACKAGE_VERSION +++ b/PACKAGE_VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.0.3int0 \ No newline at end of file From e6d16d11f6a7eb7bbbbe7551a9e9d779873dbd57 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 20:38:28 -0400 Subject: [PATCH 7/8] 2019-08-31 Fred Gleason * Fixed an indentation error in 'apis/pypad/scripts/pypad_tunein.py'. --- ChangeLog | 2 ++ apis/pypad/scripts/pypad_tunein.py | 50 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3774ce5b..4a37ac17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19066,3 +19066,5 @@ from 100 mS to 1000 mS. 2019-08-31 Fred Gleason * Incremented the package version to 3.0.3int0. +2019-08-31 Fred Gleason + * Fixed an indentation error in 'apis/pypad/scripts/pypad_tunein.py'. diff --git a/apis/pypad/scripts/pypad_tunein.py b/apis/pypad/scripts/pypad_tunein.py index 3a7119d2..fec55a4c 100755 --- a/apis/pypad/scripts/pypad_tunein.py +++ b/apis/pypad/scripts/pypad_tunein.py @@ -31,31 +31,31 @@ import configparser def ProcessPad(update): if update.hasPadType(pypad.TYPE_NOW): - section='Station'+str(n) - n=1 - while(update.config().has_section(section)): - values={} - values['id']=update.config().get(section,'StationID') - values['partnerId']=update.config().get(section,'PartnerID') - values['partnerKey']=update.config().get(section,'PartnerKey') - values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE) - values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE) - values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE) - update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album']) - try: - response=requests.get('http://air.radiotime.com/Playing.ashx',params=values) - response.raise_for_status() - except requests.exceptions.RequestException as e: - update.syslog(syslog.LOG_WARNING,str(e)) - else: - xml=ET.fromstring(response.text) - status=xml.find('./head/status') - if(status.text!='200'): - update.syslog(syslog.LOG_WARNING,'Update Failed: '+xml.find('./head/fault').text) - n=n+1 - section='Station'+str(n) - if(n==1): - update.syslog(syslog.LOG_WARNING,'No station config found') + section='Station'+str(n) + n=1 + while(update.config().has_section(section)): + values={} + values['id']=update.config().get(section,'StationID') + values['partnerId']=update.config().get(section,'PartnerID') + values['partnerKey']=update.config().get(section,'PartnerKey') + values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE) + values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE) + values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE) + update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album']) + try: + response=requests.get('http://air.radiotime.com/Playing.ashx',params=values) + response.raise_for_status() + except requests.exceptions.RequestException as e: + update.syslog(syslog.LOG_WARNING,str(e)) + else: + xml=ET.fromstring(response.text) + status=xml.find('./head/status') + if(status.text!='200'): + update.syslog(syslog.LOG_WARNING,'Update Failed: '+xml.find('./head/fault').text) + n=n+1 + section='Station'+str(n) + if(n==1): + update.syslog(syslog.LOG_WARNING,'No station config found') # # Program Name From 3d25ef475b508a72b941fed98b6f88836422c1cc Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 31 Aug 2019 20:40:02 -0400 Subject: [PATCH 8/8] 2019-08-31 Fred Gleason * Incremented the package version to 3.0.3int1. --- ChangeLog | 2 ++ NEWS | 2 +- PACKAGE_VERSION | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a37ac17..f2209b9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19068,3 +19068,5 @@ * Incremented the package version to 3.0.3int0. 2019-08-31 Fred Gleason * Fixed an indentation error in 'apis/pypad/scripts/pypad_tunein.py'. +2019-08-31 Fred Gleason + * Incremented the package version to 3.0.3int1. diff --git a/NEWS b/NEWS index 5bacac64..4c1faa67 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ The NEWS file for the Rivendell package. ------------------------------------------------------------------------------- -v3.0.3int0 -- 8/31/2019 +v3.0.3int1 -- 8/31/2019 This is an interrim, limited distribution test release of Rivedell. diff --git a/PACKAGE_VERSION b/PACKAGE_VERSION index 6ebb6949..2dc321cc 100644 --- a/PACKAGE_VERSION +++ b/PACKAGE_VERSION @@ -1 +1 @@ -3.0.3int0 \ No newline at end of file +3.0.3int1 \ No newline at end of file