From 080da912e04d156d9260a3a5eead9034d2a72af3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 22 Oct 2013 21:06:41 +0100 Subject: Allow films to be loaded when content is missing. --- src/lib/content.cc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/lib/content.cc') diff --git a/src/lib/content.cc b/src/lib/content.cc index dbb841200..e3ad42560 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -31,10 +31,11 @@ using std::set; using boost::shared_ptr; using boost::lexical_cast; -int const ContentProperty::POSITION = 400; -int const ContentProperty::LENGTH = 401; -int const ContentProperty::TRIM_START = 402; -int const ContentProperty::TRIM_END = 403; +int const ContentProperty::PATH = 400; +int const ContentProperty::POSITION = 401; +int const ContentProperty::LENGTH = 402; +int const ContentProperty::TRIM_START = 403; +int const ContentProperty::TRIM_END = 404; Content::Content (shared_ptr f, Time p) : _film (f) @@ -191,3 +192,18 @@ Content::identifier () const return s.str (); } + +bool +Content::path_valid () const +{ + return boost::filesystem::exists (_path); +} + +void +Content::set_path (boost::filesystem::path path) +{ + _path = path; + signal_changed (ContentProperty::PATH); +} + + -- cgit v1.2.3