### Description
Added filters for genre and md5 to the files API, e.g.
`/api/v2/files?genre=soul`
**This is a new feature**: Yes
**I have updated the documentation to reflect these changes**: No
There should be a schema and docs that are generated automatically. I
don't know where that is.
### Testing Notes
**What I did:**
- Used docker to deploy locally
- Confirmed filters work at
http://localhost:8080/api/v2/files?genre=Soul
**How you can replicate my testing:**
- `make clean dev`
- Upload some files!
- Visit http://localhost:8080/api/v2/files
- You can use the filters
<img width="658" alt="Screenshot 2024-12-23 at 01 36 01"
src="https://github.com/user-attachments/assets/ba19f7f3-fb3e-495d-8937-d451c70d326c"
/>
<img width="652" alt="Screenshot 2024-12-23 at 01 35 56"
src="https://github.com/user-attachments/assets/c7191131-a963-463a-b52f-9d0952192555"
/>
_How can the reviewer validate this PR?_
- See above
- wrote tests to confirm filters work
### Description
This fixes various problems in legacy migrations that were preventing a
successful database migration from Airtime 2.5.1. Previously, following
[the
procedure](https://libretime.org/docs/admin-manual/install/migrate-from-airtime/)
using the migrations provided in the Libretime 4.2.0 installer, without
the fixes in this PR, would either fail completely, or cause all of the
imported data to be completely deleted.
_migrations.py
If schema_version is not found in the table cc_prefs, it then checks for
system_version to have a value of '2.5.1' (in case this is an airtime
2.5.1 migration which will not have any schema_version in cc_pref). If
found, it prevents loading of the schema file, which is critical to
preserving the imported Airtime data.
0006_2_5_5
Removed a redundant addition of the image_path and description columns
to cc_show (done in earlier migration 003_2_5_2)
0015_2_5_17
Fixed a syntax error with adding the artwork column to cc_files
0023_3_0_0_alpha_9_1
Removed a redundant addition of the artwork column to cc_files (done in
earlier migration 0015_2_5_7)
### Documentation Changes
The [airtime migration
documentation](https://libretime.org/docs/admin-manual/install/migrate-from-airtime/)
already suggests a procedure to be followed, it just didn't work because
of problems within these migrations. The procedure as documented should
now work for those coming from Airtime 2.5.1.
### Testing Notes
**What I did:**
I attempted to migrate an actual airtime 2.5.1 database from a
production system containing a large amount of shows, tracks, and users.
I observed that the migration completed without errors, and that the
expected system state was achieved within Libretime. Specifically, the
calendar, library, authentication, and other aspects are populated with
the data that was present in the migrated Airtime database, and
Libretime is able to function using this data.
**How you can replicate my testing:**
Install Libretime 4.2.0. Restore a sample postrgresql database backup
from an Airtime 2.5.1 server. Apply the database migration. Restart the
services. Login and view the library, calender, etc.
### **Links**
Closes: #3121
May also be related to, or even close (as a duplicate): #2563
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[adamchainz/django-upgrade](https://redirect.github.com/adamchainz/django-upgrade)
| repository | patch | `1.22.1` -> `1.22.2` |
Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://redirect.github.com/renovatebot/renovate/discussions/new)
if you have any questions.
---
### Release Notes
<details>
<summary>adamchainz/django-upgrade (adamchainz/django-upgrade)</summary>
###
[`v1.22.2`](https://redirect.github.com/adamchainz/django-upgrade/blob/HEAD/CHANGELOG.rst#1222-2024-12-02)
[Compare
Source](https://redirect.github.com/adamchainz/django-upgrade/compare/1.22.1...1.22.2)
- Make these fixers work when `django.contrib.gis.db.models` is used to
import objects from `django.db.models`:
- `check_constraint_condition`
- `index_together`
`Issue #​513
<https://github.com/adamchainz/django-upgrade/issues/513>`\__.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS40Mi40IiwidXBkYXRlZEluVmVyIjoiMzkuNDIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS40Mi40IiwidXBkYXRlZEluVmVyIjoiMzkuNDIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicGhwIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.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 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
Upload comments from mp3 files into libretime `comments` and
`description` fields.
**This is a new feature**:
Yes
**I have updated the documentation to reflect these changes**:
No none required
### Testing Notes
**What I did:**
I uploaded tracks that contained comments into LibreTime and checked the
database to ensure that the `comments` and `description` fields were
correctly populated. I then went to the UI and confirmed that the
description field had the MP3 comment in it inside of the metadata
editor. I then uploaded some files that did not have comments to make
sure I did not break any existing functionality.
**How you can replicate my testing:**
Follow the steps in what I did
### **Links**
Fixes#526
---------
Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[codecov/codecov-action](https://redirect.github.com/codecov/codecov-action)
| action | major | `v4` -> `v5` |
---
### Release Notes
<details>
<summary>codecov/codecov-action (codecov/codecov-action)</summary>
###
[`v5`](https://redirect.github.com/codecov/codecov-action/compare/v4...v5)
[Compare
Source](https://redirect.github.com/codecov/codecov-action/compare/v4...v5)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMS41IiwidXBkYXRlZEluVmVyIjoiMzkuMTEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiY2kiLCJkZXBlbmRlbmNpZXMiXX0=-->
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
FFMPEG filters for silence detection are too aggressive.
**This is a new feature**:
No
**I have updated the documentation to reflect these changes**:
No
### Testing Notes
**What I did:**
Ran tests and made sure they passed
**How you can replicate my testing:**
Upload files that start out quiet or end quiet and see that the
cue-in/cue-out points don't cut off the track. Or just run tests as
there are files that do that
### **Links**
Closes: #2629