Try to improve spacing in Keys tab of prefs on macOS (#1550).
[dcpomatic.git] / src / wx / content_view.cc
index 035118245fc150017b45dae8fa46b4ec2d988c28..d4e18108dd3a97225222f16132bf445cf03d10b3 100644 (file)
@@ -39,6 +39,7 @@ using boost::shared_ptr;
 using boost::weak_ptr;
 using boost::optional;
 using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
 
 ContentView::ContentView (wxWindow* parent)
        : wxListCtrl (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER)
@@ -70,8 +71,8 @@ ContentView::update ()
        DeleteAllItems ();
        _content.clear ();
        optional<path> dir = Config::instance()->player_content_directory();
-       if (!dir) {
-               return;
+       if (!dir || !boost::filesystem::is_directory(*dir)) {
+               dir = home_directory ();
        }
 
        wxProgressDialog progress (_("DCP-o-matic"), _("Reading content directory"));
@@ -95,7 +96,7 @@ ContentView::update ()
                        }
                } catch (boost::filesystem::filesystem_error& e) {
                        /* Never mind */
-               } catch (dcp::DCPReadError& e) {
+               } catch (dcp::ReadError& e) {
                        /* Never mind */
                }
        }
@@ -108,7 +109,7 @@ ContentView::update ()
                        }
                        return;
                }
-               dcpomatic_sleep (1);
+               dcpomatic_sleep_seconds (1);
        }
 
        /* Add content from successful jobs and report errors */