codefordenver / Comrad

Open-source web application for radio stations to manage show schedules, traffic and compliance
ISC License
25 stars 9 forks source link

Show find API issues #465

Closed seankwilliams closed 5 years ago

seankwilliams commented 5 years ago

The show API is not returning the correct values in the following instances:

http://localhost:3000/v1/shows/?startDate="2019-05-23T14:22:09.544Z"&endDate="2019-05-23T23:22:09.544Z"

Actual Results: []

Expected Results: Should return the events between 8:22am-5:22pm on 5/23. Let's include events that span over that timeframe, in other words: if an event starts before 8:22am but is active at 8:22am (ie, an 8am-9am event), it should be included in the results. An event that goes from 5pm-5:30pm should also be included.

http://localhost:3000/v1/shows/?startDate="2019-05-23T14:22:09.544Z"&endDate="2019-05-24T14:22:09.544Z"

Actual Results: Returns the following Afternoon Sound Alternative object:

{
  "show_details": {
      "guests": [
          null
      ],
      "title": "Afternoon Sound Alternative",
      "summary": "Diverse and eclectic sounds on the more adventurous side.",
      "description": "<p>Diverse and eclectic sounds on the more adventurous side. Tune in for everything from Free Jazz to Hip Hop to Cumbia.</p>",
      "producer": null,
      "host": null,
      "custom": {
          "record_audio": "1",
          "url": "afternoonsound",
          "source": "KGNU"
      }
  },
  "repeat_rule": {
      "byweekday": [
          "MO",
          "TU",
          "WE",
          "TH",
          "FR"
      ],
      "repeat_start_date": "2011-03-28T18:06:00.000Z",
      "frequency": 2,
      "repeat_end_date": "9999-01-01T07:00:00.000Z"
  },
  "status": "active",
  "exclude_dates": [
      "2016-07-29T18:06:00.000Z"
  ],
  "_id": "5cf12122f583ec16304b140d-1558721160000",
  "show_start_time_utc": "2019-05-24T18:06:00.000Z",
  "show_end_time_utc": "2019-05-24T21:00:00.000Z",
  "is_recurring": true,
  "created_at": "2019-05-31T12:42:10.647Z",
  "updated_at": "2019-05-31T12:42:10.647Z",
  "__v": 0,
  "master_show_uid": "5cf12122f583ec16304b140d",
  "master_time_id": "5cf12122f583ec16304b140d-1558721160000"
}

Expected results: Should be the 5/23 show, not the 5/24 show

http://localhost:3000/v1/shows/?startDate="2019-05-22T14:22:09.544Z"&endDate="2019-05-23T14:22:09.544Z"

Actual Results: Afternoon Sound Alternative object is:

{
        "show_details": {
            "guests": [
                null
            ],
            "title": "Afternoon Sound Alternative",
            "summary": "Diverse and eclectic sounds on the more adventurous side.",
            "description": "<p>Diverse and eclectic sounds on the more adventurous side. Tune in for everything from Free Jazz to Hip Hop to Cumbia.</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "afternoonsound",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2011-03-28T18:06:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-29T18:06:00.000Z"
        ],
        "_id": "5cf12122f583ec16304b140d-1558634760000",
        "show_start_time_utc": "2019-05-23T18:06:00.000Z",
        "show_end_time_utc": "2019-05-23T21:00:00.000Z",
        "is_recurring": true,
        "created_at": "2019-05-31T12:42:10.647Z",
        "updated_at": "2019-05-31T12:42:10.647Z",
        "__v": 0,
        "master_show_uid": "5cf12122f583ec16304b140d",
        "master_time_id": "5cf12122f583ec16304b140d-1558634760000"
    }

Expected Results: Should include the information from the 5/23 show instance (note the differences in show_details): show-details

jberns commented 5 years ago

BUG 1

The show API is not returning the correct values in the following instances:

http://localhost:3000/v1/shows/?startDate="2019-05-23T14:22:09.544Z"&endDate="2019-05-23T23:22:09.544Z"

Actual Results: []

Expected Results: Should return the events between 8:22am-5:22pm on 5/23. Let's include events that span over that timeframe, in other words: if an event starts before 8:22am but is active at 8:22am (ie, an 8am-9am event), it should be included in the results. An event that goes from 5pm-5:30pm should also be included.

Updated the start and end calculation to be start and end of day, current result is:

[
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Afternoon Sound Alternative",
            "summary": "Diverse and eclectic sounds on the more adventurous side.",
            "description": "<p>Diverse and eclectic sounds on the more adventurous side. Tune in for everything from Free Jazz to Hip Hop to Cumbia.</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "afternoonsound",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2011-03-28T18:06:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-29T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce535-1558634760000",
        "show_start_time_utc": "2019-05-23T18:06:00Z",
        "show_end_time_utc": "2019-05-23T21:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.267Z",
        "updated_at": "2019-05-25T02:31:27.267Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce535",
        "master_time_id": "5ce8a8ff7384ead6089ce535-1558634760000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Restless Mornings",
            "summary": "The proving ground for new talent",
            "description": "<p><span style=\"font-family: Arial,sans-serif;\">Anything can happen as new DJs get their chops behind the mixing board.<br /></span></p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "restless",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "TU",
                "WE",
                "TH",
                "FR",
                "MO"
            ],
            "repeat_start_date": "2011-03-27T09:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce538-1558602000000",
        "show_start_time_utc": "2019-05-23T09:00:00Z",
        "show_end_time_utc": "2019-05-23T11:30:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.270Z",
        "updated_at": "2019-05-25T02:31:27.270Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce538",
        "master_time_id": "5ce8a8ff7384ead6089ce538-1558602000000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Highway 322",
            "summary": "Folk music and americana",
            "description": "<p>A one hour program dedicated to Folk music and Americana.</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "highway322",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "FR"
            ],
            "repeat_start_date": "2011-04-15T01:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-28T00:00:00.000Z",
            "2012-08-30T00:00:00.000Z",
            "2013-07-18T00:00:00.000Z",
            "2012-09-06T00:00:00.000Z",
            "2012-09-06T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce547-1558659600000",
        "show_start_time_utc": "2019-05-24T01:00:00Z",
        "show_end_time_utc": "2019-05-24T02:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.281Z",
        "updated_at": "2019-05-25T02:31:27.281Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce547",
        "master_time_id": "5ce8a8ff7384ead6089ce547-1558659600000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Morning Magazine",
            "summary": "Coverage of Local and Regional Public Affairs and News",
            "description": "<p><span style=\"font-family: Arial,sans-serif;\">Including headline news at the  top and bottom of the hour, citizen commentary, wide coverage of local  and regional public affairs and news.<br /> Hosted by the KGNU News and Public Affairs Directors.</span></p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "morningmag",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "WE",
                "TH"
            ],
            "repeat_start_date": "2011-03-30T14:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce550-1558620000000",
        "show_start_time_utc": "2019-05-23T14:00:00Z",
        "show_end_time_utc": "2019-05-23T14:35:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.285Z",
        "updated_at": "2019-05-25T02:31:27.285Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce550",
        "master_time_id": "5ce8a8ff7384ead6089ce550-1558620000000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Morning Sound Alternative",
            "summary": "Diverse and eclectic sounds, on the mellow side.",
            "description": "<p>Diverse and eclectic sounds, on the mellow side. You'll hear everything from Ambient Electronics to Reggae to Folk</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "morningsound",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2011-03-28T15:30:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-29T00:00:00.000Z",
            "2017-01-20T00:00:00.000Z",
            "2017-10-16T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce552-1558625400000",
        "show_start_time_utc": "2019-05-23T15:30:00Z",
        "show_end_time_utc": "2019-05-23T18:06:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.288Z",
        "updated_at": "2019-05-25T02:31:27.288Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce552",
        "master_time_id": "5ce8a8ff7384ead6089ce552-1558625400000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Metro",
            "summary": "Locally Produced News and Public Affairs Talk Show",
            "description": "<p>Focusing on issues affecting the Metro Denver/Boulder community with a collective of hosts.&nbsp;</p>\n<p>Monday: Shiquita Yarbrough hosts on the first Monday of every month with her show Victorious Single Parent. <em>Womyn Air</em> is a collective of hosts examining women's issues on the second and fourth Monday. Miriam Schiff hosts Eye on Boulder on the third Monday. </p>\n<p>Tuesday: Jose Silva and Dave Ashton trade hosting duties looking at a variety of issues affecting the Denver community.</p>\n<p>Wednesday:&nbsp;Elzabieta hosts <em>Wellness Wednesdays</em> looking at health issues and alternates hosting duties with Beverly Grant, also looking at health and wellness ssues affecting the Denver Community.</p>\n<p>&nbsp;</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "metro",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH"
            ],
            "repeat_start_date": "2011-04-11T21:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce556-1558645200000",
        "show_start_time_utc": "2019-05-23T21:00:00Z",
        "show_end_time_utc": "2019-05-23T21:30:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.289Z",
        "updated_at": "2019-05-25T02:31:27.289Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce556",
        "master_time_id": "5ce8a8ff7384ead6089ce556-1558645200000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "A Public Affair",
            "summary": "In-depth Discussions on Local News Issues.",
            "description": "<p>In-depth discussions on local news issues.</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "apublicaffair",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "WE",
                "TH"
            ],
            "repeat_start_date": "2013-09-04T14:35:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce55e-1558622100000",
        "show_start_time_utc": "2019-05-23T14:35:00Z",
        "show_end_time_utc": "2019-05-23T15:30:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.296Z",
        "updated_at": "2019-05-25T02:31:27.296Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce55e",
        "master_time_id": "5ce8a8ff7384ead6089ce55e-1558622100000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "It's The Economy",
            "summary": "Call-in Program on a Variety of Topics Focused on the National and Local Economy",
            "description": "<p><span style=\"font-family: Arial,sans-serif;\">Call-in program on a variety of topics related to the economy.<br /> With Liz Lane, Claudia Cragg, Jim Banks, Kathy Partridge and Maeve Conran.</span></p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "1",
                "url": "economy",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "FR"
            ],
            "repeat_start_date": "2011-04-15T00:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-28T00:00:00.000Z",
            "2014-09-11T00:00:00.000Z",
            "2012-09-06T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce55d-1558656000000",
        "show_start_time_utc": "2019-05-24T00:00:00Z",
        "show_end_time_utc": "2019-05-24T01:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.295Z",
        "updated_at": "2019-05-25T02:31:27.295Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce55d",
        "master_time_id": "5ce8a8ff7384ead6089ce55d-1558656000000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Business Daily",
            "summary": "The daily drama of money and work from the BBC",
            "description": "",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "0",
                "url": "http://www.bbc.co.uk/programmes/p002vsxs",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2016-08-18T12:30:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2017-01-20T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce590-1558614600000",
        "show_start_time_utc": "2019-05-23T12:30:00Z",
        "show_end_time_utc": "2019-05-23T12:50:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.320Z",
        "updated_at": "2019-05-25T02:31:27.320Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce590",
        "master_time_id": "5ce8a8ff7384ead6089ce590-1558614600000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Community Public Radio News",
            "summary": "A community-based news show founded by former staff members of Pacifica's WBAI in New York",
            "description": "<p>It was created to remedy the lack of media attention devoted to critical issues affecting our lives.</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "0",
                "url": "http://cprmetro.blogspot.com/",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2014-10-07T11:30:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce58c-1558611000000",
        "show_start_time_utc": "2019-05-23T11:30:00Z",
        "show_end_time_utc": "2019-05-23T12:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.318Z",
        "updated_at": "2019-05-25T02:31:27.318Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce58c",
        "master_time_id": "5ce8a8ff7384ead6089ce58c-1558611000000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Witness",
            "summary": "The story of our times told by the people who were there",
            "description": "",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "0",
                "url": "http://www.bbc.co.uk/programmes/p004t1hd",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2016-08-18T12:50:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2017-01-20T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce591-1558615800000",
        "show_start_time_utc": "2019-05-23T12:50:00Z",
        "show_end_time_utc": "2019-05-23T13:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.321Z",
        "updated_at": "2019-05-25T02:31:27.321Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce591",
        "master_time_id": "5ce8a8ff7384ead6089ce591-1558615800000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Democracy Now",
            "summary": "Award Winning News Magazine Show",
            "description": "<p>A daily progressive, independent syndicated program of news, analysis, and opinion hosted by Amy Goodman.</p>",
            "producer": null,
            "host": {
                "on_air_name": "Amy Goodman And Juan Gonzalez",
                "_id": "5ce8a8e77384ead6089ce4a5",
                "first_name": "Amy",
                "last_name": "Amy Goodman And Juan Gonzalez"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.democracynow.org/",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2011-03-28T13:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2017-01-20T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce5a6-1558616400000",
        "show_start_time_utc": "2019-05-23T13:00:00Z",
        "show_end_time_utc": "2019-05-23T14:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.333Z",
        "updated_at": "2019-05-25T02:31:27.333Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5a6",
        "master_time_id": "5ce8a8ff7384ead6089ce5a6-1558616400000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "The Newsroom",
            "summary": "The world's Newsroom brings you global events as they happen",
            "description": "<p>From the BBC World Service Radio</p>",
            "producer": null,
            "host": null,
            "custom": {
                "record_audio": "0",
                "url": "http://www.bbc.co.uk/programmes/p016tklr",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2016-08-18T12:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2017-01-20T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce58f-1558612800000",
        "show_start_time_utc": "2019-05-23T12:00:00Z",
        "show_end_time_utc": "2019-05-23T12:30:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.320Z",
        "updated_at": "2019-05-25T02:31:27.320Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce58f",
        "master_time_id": "5ce8a8ff7384ead6089ce58f-1558612800000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "TUC Radio",
            "summary": "Time of Useful Consciousness Radio",
            "description": "<p>\"Time of Useful Consciousness\" is an&nbsp;aeronautical term. It is the time between the onset of oxygen deficiency and the loss of consciousness. These are the brief moments in which a pilot may save the plane.</p>",
            "producer": null,
            "host": {
                "on_air_name": "Maria Gilardin",
                "_id": "5ce8a8fe7384ead6089ce52f",
                "first_name": "Maria",
                "last_name": "Maria Gilardin"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.tucradio.org/",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "TH"
            ],
            "repeat_start_date": "2015-01-08T22:30:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce5c2-1558647000000",
        "show_start_time_utc": "2019-05-23T21:30:00Z",
        "show_end_time_utc": "2019-05-23T22:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.349Z",
        "updated_at": "2019-05-25T02:31:27.349Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5c2",
        "master_time_id": "5ce8a8ff7384ead6089ce5c2-1558647000000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "BBC Newshour",
            "summary": "Daily News Show with Stories and Perspectives from Around the World",
            "description": "<p>An award winning global news and current affairs program. Newshour covers everything from the growth of democracy to the threat of terrorism with a fresh, clear perspective from across the globe.</p>",
            "producer": null,
            "host": {
                "on_air_name": "BBC News Team",
                "_id": "5ce8a8df7384ead6089ce475",
                "first_name": "BBC",
                "last_name": "BBC News Team"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.bbc.co.uk/programmes/p002vsnk",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2015-01-06T00:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2019-03-16T00:00:00.000Z",
            "2015-03-14T00:00:00.000Z",
            "2015-07-25T00:00:00.000Z",
            "2019-04-07T00:00:00.000Z",
            "2016-07-30T00:00:00.000Z",
            "2019-04-14T00:00:00.000Z",
            "2017-03-17T00:00:00.000Z",
            "2019-04-21T00:00:00.000Z",
            "2015-10-28T00:00:00.000Z",
            "2018-07-27T00:00:00.000Z",
            "2019-04-28T00:00:00.000Z",
            "2018-03-17T00:00:00.000Z",
            "2018-07-28T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce59d-1558652400000",
        "show_start_time_utc": "2019-05-23T23:00:00Z",
        "show_end_time_utc": "2019-05-24T00:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.329Z",
        "updated_at": "2019-05-25T02:31:27.329Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce59d",
        "master_time_id": "5ce8a8ff7384ead6089ce59d-1558652400000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Ragtime America",
            "summary": "Ragtime and related music from the classics of the past up to the music of today",
            "description": "<p><span style=\"font-family: Arial,sans-serif;\">\"Ragtime dead? Hell, it ain't even sick!\" The only show of its kind between the Mississippi River and the Pacific Coast features Ragtime and related music from the classics of the past up to the contemporary music of today. If it's syncopated, you'll find it here. </span></p>",
            "producer": null,
            "host": {
                "on_air_name": "Jack Rummel",
                "_id": "5ce8a8d67384ead6089ce43d",
                "first_name": "Jack",
                "last_name": "Jack Rummel"
            },
            "custom": {
                "record_audio": "1",
                "url": "ragtime",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "FR"
            ],
            "repeat_start_date": "2011-04-22T02:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2014-03-20T00:00:00.000Z",
            "2014-04-17T00:00:00.000Z",
            "2014-05-15T00:00:00.000Z",
            "2014-06-19T00:00:00.000Z",
            "2016-07-28T00:00:00.000Z",
            "2011-06-09T00:00:00.000Z",
            "2012-08-30T00:00:00.000Z",
            "2014-07-17T00:00:00.000Z",
            "2011-07-14T00:00:00.000Z",
            "2014-08-21T00:00:00.000Z",
            "2011-08-11T00:00:00.000Z",
            "2014-09-18T00:00:00.000Z",
            "2011-09-08T00:00:00.000Z",
            "2014-10-16T00:00:00.000Z",
            "2011-10-13T00:00:00.000Z",
            "2014-11-20T00:00:00.000Z",
            "2011-11-10T00:00:00.000Z",
            "2012-09-06T00:00:00.000Z",
            "2014-12-18T00:00:00.000Z",
            "2011-12-08T00:00:00.000Z",
            "2014-02-20T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce5a2-1558663200000",
        "show_start_time_utc": "2019-05-24T02:00:00Z",
        "show_end_time_utc": "2019-05-24T03:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.331Z",
        "updated_at": "2019-05-25T02:31:27.331Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5a2",
        "master_time_id": "5ce8a8ff7384ead6089ce5a2-1558663200000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Swing Shift",
            "summary": "Music from the Big Band and Swing Era",
            "description": "<p>Music from the Big Band and Swing Era. Tune in for classics from Basie, Ella, Goodman, and more.</p>",
            "producer": null,
            "host": {
                "on_air_name": "Dave Gloss",
                "_id": "5ce8a8d47384ead6089ce42c",
                "first_name": "Dave",
                "last_name": "Dave Gloss"
            },
            "custom": {
                "record_audio": "1",
                "url": "swingshift",
                "source": "KGNU"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "FR"
            ],
            "repeat_start_date": "2011-04-15T03:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-28T00:00:00.000Z",
            "2012-08-30T00:00:00.000Z",
            "2012-09-06T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce5a3-1558666800000",
        "show_start_time_utc": "2019-05-24T03:00:00Z",
        "show_end_time_utc": "2019-05-24T04:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.332Z",
        "updated_at": "2019-05-25T02:31:27.332Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5a3",
        "master_time_id": "5ce8a8ff7384ead6089ce5a3-1558666800000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Peace Talks Radio",
            "summary": "Exploring the alternatives to violence",
            "description": "<p>Peace Talks Radio is groundbreaking radio that hits right to the heart of how peace can arise out of chaos and disillusionment. Each program is a polished jewel, hard as diamond and just as bright. It is 'must listen' radio at its very best!</p>",
            "producer": null,
            "host": {
                "on_air_name": "Paul Ingles",
                "_id": "5ce8a8fe7384ead6089ce530",
                "first_name": "Paul",
                "last_name": "Paul Ingles"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.goodradioshows.org/",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "TH"
            ],
            "repeat_start_date": "2018-06-14T22:30:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce5c3-1558650600000",
        "show_start_time_utc": "2019-05-23T22:30:00Z",
        "show_end_time_utc": "2019-05-23T23:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.349Z",
        "updated_at": "2019-05-25T02:31:27.349Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5c3",
        "master_time_id": "5ce8a8ff7384ead6089ce5c3-1558650600000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Economic Update",
            "summary": "A weekly program hosted by Richard D. Wolff, Professor of Economics",
            "description": "<p>Wolff&rsquo;s specialty on this program is to take complex economic issues and make them understandable, empowering listeners with information to analyze not only their own financial situation but the economy at large. By focusing on the economic dimensions of everyday life - wages, jobs, taxes, debts, interest rates, prices, and profits - the program explores alternative ways to organize markets, and government policies.</p>",
            "producer": null,
            "host": {
                "on_air_name": "Prof. Richard Wolff",
                "_id": "5ce8a8fe7384ead6089ce532",
                "first_name": "Prof.",
                "last_name": "Prof. Richard Wolff"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.rdwolff.com/articles/audio",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "TH"
            ],
            "repeat_start_date": "2016-02-18T23:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [
            "2016-07-28T00:00:00.000Z",
            "2016-07-21T00:00:00.000Z"
        ],
        "_id": "5ce8a8ff7384ead6089ce5c5-1558648800000",
        "show_start_time_utc": "2019-05-23T22:00:00Z",
        "show_end_time_utc": "2019-05-23T22:30:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.350Z",
        "updated_at": "2019-05-25T02:31:27.350Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5c5",
        "master_time_id": "5ce8a8ff7384ead6089ce5c5-1558648800000"
    },
    {
        "show_details": {
            "guests": [
                null
            ],
            "title": "Democracy Now Special Coverage",
            "summary": "Special coverage from Democracy Now on the Republican and Democratic National Conventions",
            "description": "<p>During the weeks of July 18-22 and 25-29, Democracy Now will produce a special second hour of programming covering the Presidentail conventions for the two major political parties. KGNU will air this programmings for those two weeks.</p>",
            "producer": null,
            "host": {
                "on_air_name": "Amy Goodman, Juan Gonzales and the Pacifica News Team",
                "_id": "5ce8a8fc7384ead6089ce526",
                "first_name": "Amy",
                "last_name": "Amy Goodman, Juan Gonzales and the Pacifica News Team"
            },
            "custom": {
                "record_audio": "0",
                "url": "http://www.democracynow.org/",
                "source": "Ext"
            }
        },
        "repeat_rule": {
            "byweekday": [
                "MO",
                "TU",
                "WE",
                "TH",
                "FR"
            ],
            "repeat_start_date": "2016-07-18T22:00:00.000Z",
            "frequency": 2,
            "repeat_end_date": "9999-01-01T07:00:00.000Z"
        },
        "status": "active",
        "exclude_dates": [],
        "_id": "5ce8a8ff7384ead6089ce5c6-1558648800000",
        "show_start_time_utc": "2019-05-23T22:00:00Z",
        "show_end_time_utc": "2019-05-23T23:00:00Z",
        "is_recurring": true,
        "created_at": "2019-05-25T02:31:27.351Z",
        "updated_at": "2019-05-25T02:31:27.351Z",
        "__v": 0,
        "master_show_uid": "5ce8a8ff7384ead6089ce5c6",
        "master_time_id": "5ce8a8ff7384ead6089ce5c6-1558648800000"
    }
]
seankwilliams commented 5 years ago

Thanks @jberns! Do you want me to verify and give any feedback as you work through these, or do that once you've got everything fixed?

jberns commented 5 years ago

All these except for the last instance one is complete with the latest branch. For the instances we need to add an async lookup to the master show, and then replace any of the show_detail fields that are undefined.

seankwilliams commented 5 years ago

Right on, thanks @jberns !