RocketMan / zookeeper

Zookeeper Online is a music database and charting application for student and independent radio.
GNU General Public License v3.0
4 stars 3 forks source link

ZootopiaListener fails to delete short show that spans top of the hour #449

Closed RocketMan closed 1 month ago

RocketMan commented 5 months ago

If ZootopiaListener creates a show that begins shortly before top of the hour, and then detects another show shortly after top of the hour, such that the duration of the resulting show would be less than the minimum (15 minutes), it incorrectly tries to end the show prematurely rather than delete it.

Expected: When the resulting show length is less than the minimum, it should delete the show.

Here is an example where ZootopiaListener attempts to end a show prematurely, when in fact, it should have issued a DELETE:

Apr 21 03:56:04 zookeeper zk[26951]: Now airing: Zootopia with Team KZSU
Apr 21 04:01:25 zookeeper zk[26951]: Now airing: Comes to Mind with Zero
Apr 21 04:01:26 zookeeper zk[26951]: ZootopiaListener: Server error: `PATCH https://zookeeper.stanford.edu/api/v1/playlist/49732` resulted in a `500 Internal Server Error` response:
Apr 21 04:01:26 zookeeper zk[26951]: {"errors":[{"status":500,"title":"Invalid time range (min 15 minutes, max 6 hours)"}],"jsonapi":{"version":"1.0"}}