From da908d815787cd0272c8bdeef40e1a4d2f6a29f8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 5 Apr 2021 00:51:29 +0200 Subject: Fix confusing error on trying to load a DoM project into the player (#1948). --- src/tools/dcpomatic_player.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tools') diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 72ac93cc7..77e48ce0c 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -352,6 +352,7 @@ public: reset_film (); try { _stress.set_suspended (true); + // here auto dcp = make_shared(dir); auto job = make_shared(_film, dcp); _examine_job_connection = job->Finished.connect(bind(&DOMFrame::add_dcp_to_film, this, weak_ptr(job), weak_ptr(dcp))); @@ -361,6 +362,15 @@ public: return; } Config::instance()->add_to_player_history (dir); + } catch (ProjectFolderError &) { + error_dialog ( + this, + wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), + _( + "This looks like a DCP-o-matic project folder, which cannot be loaded into the player. " + "Choose the DCP directory inside the DCP-o-matic project folder if that's what you want to play." + ) + ); } catch (dcp::ReadError& e) { error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what())); } catch (DCPError& e) { -- cgit v1.2.3