diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-10-22 21:06:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-10-22 21:06:41 +0100 |
| commit | 080da912e04d156d9260a3a5eead9034d2a72af3 (patch) | |
| tree | 2ebf01d3a283bd2780a3b5b25e6b3bcefb504c9e /src/lib/content.cc | |
| parent | 119178eddf7aa38083862a913e8519591b5b01a0 (diff) | |
Allow films to be loaded when content is missing.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 24 |
1 files changed, 20 insertions, 4 deletions
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<const Film> 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); +} + + |
