### Description In the existing logic of `retrieveMediaFiles`, the time remaining in show is calculated incorrectly in some scenarios. Each time a duration is subtracted from `showLimit`, it is not the duration of the files just added, but instead the length of all files scheduled. This can cause cases where a smart block set to "time remaining in show" fails to completely fill the program. For example, given a 30 minute show, and a playlist like follows: 1. a 5 minute track 2. another 5 minute track 3. smart block, set to time remaining in show When item 1 is added, `showLimit` is reduced by 5 minutes as expected. When item 2 is added, `showLimit` is reduced by 10 minutes (as both items 1 and 2 are counted). As a result, the smart block is only run to fill 15 minutes, leaving 5 minutes unfilled. This PR resolves this issue, by recalculating `showLimit` from the original duration rather than subtracting from a running total. This change not does implement a new feature and should not require any changes to documentation. ### Testing Notes **What I did:** - On a dev environment, set up a playlist as described above. - Before applying this PR, created a show and scheduled playlist, and confirmed issue was reproducible - Applied PR and repeated, and confirmed show was filled completely. Also repeated this testing with sample data from our production instance. Here is a sample schedule of the "before" case with sample data, showing the issue  The smartblock that scheduled the music is set to allow last track to overflow, but 3m55s was left unscheduled. Using the same playlist and same track library, here is a sample schedule after the PR applied:  As expected, the show is fully scheduled with the last track overflowing. Additionally, I've applied this PR as a hot fix to our production instance, where it has been running for a week without issue. Also performed spot tests of playlists without smart blocks, smart blocks scheduled directly (not in playlists) and autoloading playlists, with no change in behaviour observed as a result of this change. **How you can replicate my testing:** Same test steps as I followed should be able to reproduce issue & validate fix on any instance. ### **Links** Not directly related to issue fixed by #3019, but also addresses the issue of dead air left at end of blocks. Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com> |
||
---|---|---|
.github | ||
analyzer | ||
api | ||
api-client | ||
dev | ||
docker | ||
docs | ||
installer | ||
legacy | ||
playout | ||
shared | ||
tools | ||
worker | ||
.codespellignore | ||
.dockerignore | ||
.env.dev | ||
.gitattributes | ||
.gitignore | ||
.pre-commit-config.yaml | ||
.vale.ini | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LEGACY.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
SECURITY.md | ||
Vagrantfile | ||
cloud-init.yml | ||
codecov.yml | ||
docker-bake.json | ||
docker-compose.override.yml | ||
docker-compose.yml | ||
install | ||
pyproject.toml |
README.md
LibreTime makes it easy to run your own online or terrestrial radio station. It is a community managed fork of the AirTime project.
It is managed by a friendly inclusive community of stations from around the globe that use, document and improve LibreTime. Join us in fixing bugs and in defining how we manage the codebase going forward.
Check out the documentation for more information and start broadcasting!
Please note that LibreTime is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
You can find details about our development process in the contributing guide.
Support
To get support for any questions or problems you might have using the software we have a forum at discourse.libretime.org. We are moving towards using the forum to provide community support and reserving the github issue queue for confirmed bugs and well-formed feature requests.
You can also contact us through Matrix (#libretime:matrix.org) where you can talk with other users and developers.
Contributors
Code Contributors
This project exists thanks to all the people who contribute.
Financial Contributors
Become a financial contributor and help us sustain our community on OpenCollective.
Individuals
Organizations
Support this project with your organization. Your logo will show up here with a link to your website.
License
LibreTime is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
Copyright
Copyright (c) 2011-2017 Sourcefabric z.ú.
Copyright (c) 2017-2023 LibreTime Community
Please refer to the LEGACY file for more information.