Cleanup: remove unnecessary check.
[dcpomatic.git] / src / lib / screen.cc
index 504504c8c8cf34e23c0003e87f4705d87103b016..2c821eceb0225fb2f51a23b4bf1a8cb9a78d404f 100644 (file)
@@ -88,8 +88,8 @@ kdm_for_screen (
        }
 
        auto cinema = screen->cinema;
-       dcp::LocalTime const begin(valid_from, cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0);
-       dcp::LocalTime const end  (valid_to,   cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0);
+       dcp::LocalTime const begin(valid_from, dcp::UTCOffset(cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0));
+       dcp::LocalTime const end  (valid_to,   dcp::UTCOffset(cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0));
 
        auto const kdm = film->make_kdm (
                        screen->recipient.get(),
@@ -105,9 +105,11 @@ kdm_for_screen (
        dcp::NameFormat::Map name_values;
        if (cinema) {
                name_values['c'] = cinema->name;
+       } else {
+               name_values['c'] = "";
        }
        name_values['s'] = screen->name;
-       name_values['f'] = film->name();
+       name_values['f'] = kdm.content_title_text();
        name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
        name_values['i'] = kdm.cpl_id();