diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-13 20:11:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-13 20:11:13 +0100 |
| commit | 8cae2aff2a9089f8557e7b66b50f5035d272201f (patch) | |
| tree | 159ec04b90884d9c0d3b594b475b02f5711cb650 /src | |
| parent | b405639641e1e2cecba5d5ce1e2cdc4554755650 (diff) | |
Fix failure to update cinema screen information (#2944).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/cinema_list.cc | 13 | ||||
| -rw-r--r-- | src/lib/cinema_list.h | 2 | ||||
| -rw-r--r-- | src/wx/screens_panel.cc | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/cinema_list.cc b/src/lib/cinema_list.cc index 41b9dbab3..6805a42cd 100644 --- a/src/lib/cinema_list.cc +++ b/src/lib/cinema_list.cc @@ -421,15 +421,16 @@ CinemaList::cinema_by_name_or_email(std::string const& text) const void -CinemaList::update_screen(ScreenID id, dcpomatic::Screen const& screen) +CinemaList::update_screen(CinemaID cinema_id, ScreenID screen_id, dcpomatic::Screen const& screen) { SQLiteStatement statement(_db, _screens.update("WHERE id=?")); - statement.bind_text(1, screen.name); - statement.bind_text(2, screen.notes); - statement.bind_text(3, screen.recipient->certificate(true)); - statement.bind_text(4, screen.recipient_file.get_value_or("")); - statement.bind_int64(5, id.get()); + statement.bind_int64(1, cinema_id.get()); + statement.bind_text(2, screen.name); + statement.bind_text(3, screen.notes); + statement.bind_text(4, screen.recipient->certificate(true)); + statement.bind_text(5, screen.recipient_file.get_value_or("")); + statement.bind_int64(6, screen_id.get()); statement.execute(); } diff --git a/src/lib/cinema_list.h b/src/lib/cinema_list.h index c91f29476..101f93607 100644 --- a/src/lib/cinema_list.h +++ b/src/lib/cinema_list.h @@ -99,7 +99,7 @@ public: boost::optional<std::pair<CinemaID, Cinema>> cinema_by_name_or_email(std::string const& text) const; ScreenID add_screen(CinemaID cinema_id, dcpomatic::Screen const& screen); - void update_screen(ScreenID id, dcpomatic::Screen const& screen); + void update_screen(CinemaID cinema_id, ScreenID screen_id, dcpomatic::Screen const& screen); void remove_screen(ScreenID id); boost::optional<dcpomatic::Screen> screen(ScreenID screen_id) const; std::vector<std::pair<ScreenID, dcpomatic::Screen>> screens(CinemaID cinema_id) const; diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc index 755132ef1..812f5ae85 100644 --- a/src/wx/screens_panel.cc +++ b/src/wx/screens_panel.cc @@ -465,7 +465,7 @@ ScreensPanel::edit_screen(CinemaID cinema_id, ScreenID screen_id) screen->recipient = dialog.recipient(); screen->recipient_file = dialog.recipient_file(); screen->trusted_devices = dialog.trusted_devices(); - cinemas.update_screen(screen_id, *screen); + cinemas.update_screen(cinema_id, screen_id, *screen); auto item = screen_to_item(screen_id); DCPOMATIC_ASSERT (item); |
