mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 14:50:11 +01:00
2018-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added support for cart notifications to Full Disc Ripper in rdlibrary(1).
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// CD Ripper Dialog for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2003,2010,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2003,2010,2016-2018 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
|
||||
@@ -26,10 +26,12 @@
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
@@ -997,7 +999,7 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
// Create Cut
|
||||
//
|
||||
RDCut::create(cutname);
|
||||
|
||||
|
||||
rip_done=false;
|
||||
rip_rip_aborted=false;
|
||||
rip_track_number=track;
|
||||
@@ -1067,6 +1069,7 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
cut->setDescription(rip_wave_datas[track-1]->title());
|
||||
cut->setIsrc(rip_cddb_record.isrc(rip_track_number-1));
|
||||
cart->clearPending();
|
||||
SendNotification(RDNotification::AddAction,cart->number());
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1143,3 +1146,14 @@ QString DiskRipper::BuildTrackName(int start_track,int end_track) const
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void DiskRipper::SendNotification(RDNotification::Action action,
|
||||
unsigned cartnum)
|
||||
{
|
||||
RDNotification *notify=
|
||||
new RDNotification(RDNotification::CartType,action,QVariant(cartnum));
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
qApp->processEvents();
|
||||
delete notify;
|
||||
}
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <qtextedit.h>
|
||||
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rdtransportbutton.h>
|
||||
#include <rdcdplayer.h>
|
||||
#include <rdcddbrecord.h>
|
||||
#include <rdcddblookup.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rdnotification.h>
|
||||
#include <rdtransportbutton.h>
|
||||
#include <rdwavedata_dialog.h>
|
||||
|
||||
#include <rdlibrary_conf.h>
|
||||
@@ -87,6 +88,7 @@ class DiskRipper : public QDialog
|
||||
void RipTrack(int track,int end_track,QString cutname,QString title);
|
||||
void UpdateRipButton();
|
||||
QString BuildTrackName(int start_track,int end_track) const;
|
||||
void SendNotification(RDNotification::Action action,unsigned cartnum);
|
||||
RDCdPlayer *rip_cdrom;
|
||||
RDCddbRecord rip_cddb_record;
|
||||
RDCddbLookup *rip_cddb_lookup;
|
||||
|
||||
@@ -1500,7 +1500,7 @@ void MainWidget::SendNotification(RDNotification::Action action,
|
||||
unsigned cartnum)
|
||||
{
|
||||
RDNotification *notify=
|
||||
new RDNotification(RDNotification::CartType,action,cartnum);
|
||||
new RDNotification(RDNotification::CartType,action,QVariant(cartnum));
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
delete notify;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user