# Rounding off the hours to be ZERO

**URL:** <https://discourse.libretime.org/t/rounding-off-the-hours-to-be-zero/496>\
**Category:** Get Help\
**Created:** [March 20, 2020, 3:31am UTC](https://discourse.libretime.org/t/rounding-off-the-hours-to-be-zero/496 "2020-03-20T03:31:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmahelona](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/kmahelona/32/807_2.png) [@kmahelona](https://discourse.libretime.org/u/kmahelona)\
**Post date:** [March 20, 2020, 3:31am UTC](https://discourse.libretime.org/t/rounding-off-the-hours-to-be-zero/496/1 "2020-03-20T03:31:46Z")

</div>

What’s a way to ensure a show always ends without any music being scheduled under or over the hour? If you have a large library, it’s statistically likely you’ll have a song that can will up the show to be “+00:00”. Currently we have to do this manually - see how much time is left in a show then find a song that’s exactly that length (or swap out a few songs until we can get to +00:00).

Is it possible to write this logic into a smart block? There is a “Time Remaining In Show” option in smart blocks but when you have that in a playlist it doesn’t seem to work - in one example my smart block just loads 1 song rather than 4 to fill the show. I’m keen to try and implement this with some guidance.

---

<div class="post-metadata">

**Author:** ![codenift](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/codenift/32/165_2.png) [@codenift](https://discourse.libretime.org/u/codenift)\
**Post date:** [March 21, 2020, 3:25am UTC](https://discourse.libretime.org/t/rounding-off-the-hours-to-be-zero/496/2 "2020-03-21T03:25:21Z")

</div>

I haven’t looked much into how LT maths it out, might not be doing a good job at it… but just by looking at how LT highlights the last track, I don’t think it will be hard to tell it to skip and find a replacement if any is found for that show playlist even if it’s rearranged after, as in find something shorter, closer to the end of the show. I wouldn’t go too crazy with getting to exactly 00:00, so having 1 or 2 seconds cut off shouldn’t be noticeable, but if having enough tracks in that playlist (using Smartblocks or not), then the better chances in getting what you want. I think it’s something we can improve. I’ll to take a look at it soon and see what can be done… unless someone beats me to it.

---

<div class="post-metadata">

**Author:** ![kmahelona](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/kmahelona/32/807_2.png) [@kmahelona](https://discourse.libretime.org/u/kmahelona)\
**Post date:** [March 26, 2020, 4:32am UTC](https://discourse.libretime.org/t/rounding-off-the-hours-to-be-zero/496/3 "2020-03-26T04:32:19Z")

</div>

Thank you. I just had a programmer use the “Time Remaining In Show” in a smart block in a playlist thinking it would fill the show up but it didn’t… had to fix some dead air this morning!
