This PR contains the following updates:
| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Configuration
📅 **Schedule**: Branch creation - "after 4am and before 5am on monday"
(UTC), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/libretime/libretime).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicGhwIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
### Description
Having a global intro and outro playlist in settings is not very
flexible for special programming. This adds an override intro/outro
playlist per show. If it is not set, the global one is used. also it's
ignored if there's no autloading at all.
**I have updated the documentation to reflect these changes**:
Yes
### Testing Notes
**What I did:**
Schedule 2 shows, one without defining custom lists, one with defining
custom lists. one hour before the show starts it should be populated
correctly. If you define a global list it shojuld be replaced with the
per-show list.
---------
Co-authored-by: Thomas Göttgens <tgoettgens@mail.com>
### Description
When running a radio station it is generally a good idea to reduce dead
air time. The current algorithm for adding tracks to a block/show can
leave a lot of dead air time at the end as it doesn't use a very good
algorithm. Adding tracks to a show until it is full while making it as
full as possible is a well known problem in computer science. It is the
[Subset Sum Problem](https://en.wikipedia.org/wiki/Subset_sum_problem).
This PR implements a Randomized Greedy with Local Improvement (RGLI)
approximation solution for the Subset Sum Problem. The new algorithm is
only used when sort type is random and overflow is not enabled and there
is no limit on the number of tracks that can be used.
**This is a new feature**:
Improvement on an existing feature.
**I have not updated the documentation to reflect these changes**:
I did not update the documentation because the current scheduling
algorithm is not currently documented and its existing features have not
changed.
### Testing Notes
**What I did:**
I first attempted a fully polynomial time approximation scheme solution,
however it is really bad at finding good solutions for high density
values and can kinda slow the more tracks/time you have. So I instead
implemented an RGLI which is O(nlogn) and has been giving much better
results.
I implemented the solution in a separate project and tested it and timed
the values with a normal distribution of 500 songs with a mean of 3
minutes and a standard deviation of 1 minute. With a show size of 1 hour
the algorithm took around 10-15 ms to run. When adjusting the block size
and track size the algorithm still was pretty quick to run. Am going to
be testing on an instance with lots of tracks later, will update PR when
I have done that.
**How you can replicate my testing:**
_How can the reviewer validate this PR?_
### **Links**
Closes#3018
### Description
Add File Name and Size to the metadata editor screen, and added a File
Name column to the tracks data table.
**This is a new feature**:
Yes
**I have updated the documentation to reflect these changes**:
No, just some simple UI additions so no documentation needed.
### Testing Notes
**What I did:**
I uploaded some tracks, clicked on edit, and saw that the filename and
size showed up at the top. I also went out to the tracks view and added
the File Name column and saw that the filename displayed properly.
**How you can replicate my testing:**
Do what I did
### **Links**
Fixes#3053
### Description
It is good to have a deterministic order when doing explicit file
sorting. This sorts by filename when last played time is null. I would
expect filename to be the next sort after last played time in case of a
tie, and was surprised to find it was not explicit. It should not break
any existing use cases.
**This is a new feature**:
Kind of?
**I have updated the documentation to reflect these changes**:
I did not update any documentation as this way seems like the logical
expected way to do the sort.
### Testing Notes
**What I did:**
I loaded up some tracks into a local libretime instance, let some of
them play, and tested that all the old sorts worked as before as well as
tracks getting sorted by filepath in case of a last played time
### Description
The filename criteria searched the full file path and as such does not
work as expected.
**This is a new feature**:
No
**I have updated the documentation to reflect these changes**:
No docs changes are required as this is fixing a bug to make things work
as expected and documented.
### Testing Notes
**What I did:**
I uploaded some files, and tested that the file name criteria worked as
expected.
**How you can replicate my testing:**
Spin up the stack, upload some files and make sure the filename criteria
works as expected.
[](https://renovatebot.com)
This PR contains the following updates:
| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Configuration
📅 **Schedule**: Branch creation - "after 4am and before 5am on monday"
(UTC), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/libretime/libretime).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicGhwIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
### Description
It is useful to be able to automatically filter tracks to a certain date
or day when scheduling tracks for playback. This adds the ability to do
just that in any string filter with the `date{format}` macro.
Closes: #3012
[](https://renovatebot.com)
This PR contains the following updates:
| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Configuration
📅 **Schedule**: Branch creation - "after 4am and before 5am on monday"
(UTC), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/libretime/libretime).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJwaHAiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
### 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>
When calling DELETE "/rest/media/<id>" the call fails with 'unknown error'
if it's not within a GUI session. The StoredFile delete method checks
for user permissions regardless of if a user is even known.
### Description
Build and use the schedule events only in playout, the events generated
by legacy are not used anymore.
This ensure that we don't have to maintain 2 different implementation in
2 different languages. We still need the php function to run to make
sure the side effects of this function are executed (filling the
schedule in the DB).
A visual cue point editor in the track editor view. This view displays the track as a waveform and allows you to set where the in- and out-cue points are set. These cue points determine the start and end points of the track.
---------
Co-authored-by: Thomas Göttgens <tgoettgens@mail.com>
Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>