From d3142fb1064a094751c9994ddc3ca2cef02813de Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Mon, 29 Jan 2018 22:31:14 -0500 Subject: [PATCH] Get the committee ID for this committee video Toward openva/rs-video-processor#33 and openva/rs-video-processor#59. --- cron/poll_video_rss.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cron/poll_video_rss.php b/cron/poll_video_rss.php index 751ed2d..aa6fd2e 100644 --- a/cron/poll_video_rss.php +++ b/cron/poll_video_rss.php @@ -141,9 +141,19 @@ */ if ($type == 'committee') { + $title_parts = explode(' - ', $item->title); - $committee = $title_parts[0]; + $committee_name = $title_parts[0]; $meeting_time = end($title_parts); + + /* + * Figure out the committee ID. + */ + $committee = new Committee; + $committee->chamber = $chamber; + $committee->name = $committee_name; + $committee_id = $committee->get_id(); + } /* @@ -161,7 +171,8 @@ */ if ($type == 'committee') { - $video_data['committee'] = $committee; + $video_data['committee'] = $committee_name; + $video_data['committee_id'] = $committee_id; $video_data['meeting_time'] = $meeting_time; }