mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-11 01:21:12 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
90d50ebc14
19
ChangeLog
19
ChangeLog
@ -19051,3 +19051,22 @@
|
||||
2019-08-29 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Modified rdlibrary(1) Rip Disk dialog to use Artist and Album
|
||||
text fields when modifying cart labels.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated ripper profiling code in rdlibrary(1) to be UTF-8 clean.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored 'RDCddbLookup' to use CDDB protocol level 6.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the Disk Ripper in rdlibrary(1) that allowed
|
||||
data tracks to be ripped.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the CD Track Ripper in rdlibrary(1) that allowed
|
||||
data tracks to be ripped.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Changed the CD player polling interval ('RDCDPLAYER_CLOCK_INTERVAL')
|
||||
from 100 mS to 1000 mS.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Incremented the package version to 3.0.3int0.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed an indentation error in 'apis/pypad/scripts/pypad_tunein.py'.
|
||||
2019-08-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Incremented the package version to 3.0.3int1.
|
||||
|
40
NEWS
40
NEWS
@ -1,5 +1,45 @@
|
||||
The NEWS file for the Rivendell package.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
v3.0.3int1 -- 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
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.0.3
|
||||
3.0.3int1
|
@ -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
|
||||
|
@ -1218,6 +1218,25 @@ ze &souboru</translation>
|
||||
<translation type="unfinished">Konec</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">Zrušit</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1209,6 +1209,25 @@ senden</translation>
|
||||
<translation type="unfinished">Ende</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">Abbrechen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1209,6 +1209,25 @@ Color</translation>
|
||||
<translation type="unfinished">Final</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">Cancelar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1095,6 +1095,25 @@ La Couleur</translation>
|
||||
<translation type="unfinished">Fin</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1208,6 +1208,25 @@ farge</translation>
|
||||
<translation type="unfinished">Slutten</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1208,6 +1208,25 @@ farge</translation>
|
||||
<translation type="unfinished">Slutten</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -1209,6 +1209,25 @@ Cor</translation>
|
||||
<translation type="unfinished">Fim</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCddbLookup</name>
|
||||
<message>
|
||||
<source>CDDB Query</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Multiple Matches Found!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">Cancelar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Qt class for accessing the FreeDB CD Database.
|
||||
//
|
||||
// (C) Copyright 2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2003-2019 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
|
||||
@ -25,13 +25,13 @@
|
||||
#include <qregexp.h>
|
||||
#include <qdatetime.h>
|
||||
#include <q3process.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <rdcddblookup.h>
|
||||
#include <rdprofile.h>
|
||||
|
||||
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;i<lookup_record->tracks();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");
|
||||
}
|
||||
|
||||
@ -458,6 +568,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());
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Qt class for accessing the FreeDB CD Database.
|
||||
//
|
||||
// (C) Copyright 2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2003-2019 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
|
||||
@ -24,9 +24,14 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qdialog.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qtcpsocket.h>
|
||||
#include <rdcddbrecord.h>
|
||||
|
||||
#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;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Linux CDROM Device.
|
||||
//
|
||||
// (C) Copyright 2002-2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 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
|
||||
@ -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()");
|
||||
@ -550,7 +553,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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Rip an audio from from CD
|
||||
//
|
||||
// (C) Copyright 2010,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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());
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
// cdripper.cpp
|
||||
//
|
||||
// CD Ripper Dialog for Rivendell.
|
||||
// CD Track Ripper Dialog for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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 <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qstringlist.h>
|
||||
//Added by qt3to4:
|
||||
#include <QLabel>
|
||||
#include <QResizeEvent>
|
||||
#include <QCloseEvent>
|
||||
@ -124,12 +123,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)));
|
||||
|
||||
//
|
||||
@ -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();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// CD Ripper Dialog for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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 <qcombobox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <q3textedit.h>
|
||||
//Added by qt3to4:
|
||||
#include <QResizeEvent>
|
||||
#include <QCloseEvent>
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// disk_ripper.cpp
|
||||
//
|
||||
// CD Ripper Dialog for Rivendell.
|
||||
// CD Disk Ripper Dialog for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -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)));
|
||||
|
||||
//
|
||||
@ -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);
|
||||
|
@ -1,8 +1,8 @@
|
||||
// disk_ripper.h
|
||||
//
|
||||
// CD Ripper Dialog for Rivendell
|
||||
// CD Disk Ripper Dialog for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user