AnalyseAudioJob (std::shared_ptr<const Film>, std::shared_ptr<const Playlist>, bool from_zero);
~AnalyseAudioJob ();
- std::string name () const;
- std::string json_name () const;
- void run ();
+ std::string name () const override;
+ std::string json_name () const override;
+ void run () override;
+ bool enable_notify () const override {
+ return true;
+ }
boost::filesystem::path path () const {
return _path;
virtual std::string json_name () const = 0;
/** Run this job in the current thread. */
virtual void run () = 0;
+ /** @return true if it should be possible to notify when this job finishes */
+ virtual bool enable_notify () const {
+ return false;
+ }
void start ();
bool pause_by_user ();
std::string json_name () const override;
void run () override;
std::string status () const override;
+ bool enable_notify () const override {
+ return true;
+ }
void set_encoder (std::shared_ptr<Encoder> t);
using std::min;
using std::shared_ptr;
using boost::bind;
-using std::dynamic_pointer_cast;
JobView::JobView (shared_ptr<Job> job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table)
d->Destroy ();
}
- if ((dynamic_pointer_cast<TranscodeJob>(_job) || dynamic_pointer_cast<AnalyseAudioJob>(_job)) && _notify->GetValue()) {
+ if (_job->enable_notify() && _notify->GetValue()) {
if (Config::instance()->notification(Config::MESSAGE_BOX)) {
wxMessageBox (std_to_wx(_job->name() + ": " + _job->status()), _("DCP-o-matic"), wxICON_INFORMATION);
}