Commit Graph

19033 Commits

Author SHA1 Message Date
renovate[bot] 5fe12d2f5d
chore(deps): update dependency django-cors-headers to >=3.14.0,<4.8 2025-02-07 00:36:32 +00:00
Scott McGrath 5b4c720e10
fix(playout): improve the way hashlib is called in libretime_playout/player (#3135)
### Description

Improves the way hashlib is called in libretime_playout/player so that
is isn't broken on systems with python < 3.9

The way it is currently called in
site-packages/libretime_playout/player/file.py, in the section where
scheduled files are copied to the cache dir for playout, specifies the
usedforsecurity=False flag as follows:
`hasher = hashlib.md5(usedforsecurity=False)`

hashlib.md5 did not support this flag until Python 3.9. Attempting to
specify the flag directly as an argument to hashlib.md5(), in an older
python environment (such as that in Ubuntu Focal 20.04), is unsafe, and
can cause hashlib.md5() to balk/throw an exception, which results in
file copy operations failing. This then precipitates into playout
problems, as scheduled media is missing from the cache folder.


This PR instead calls using hashlib.new(), and passes the argument to
that, as follows:
`hasher = hashlib.new('md5', usedforsecurity=False)`

This method of calling with the flag argument is safer, because the
constructor will take it or leave it gracefully, regardless of whether
the system has a version of hashlib that supports the `usedforsecurity`
flag. AFAICT, it improves (fixes) function on older systems without
negatively impacting others.

### Testing Notes

**What I did:**
Before applying this patch, we were experiencing occasional but fairly
regular periods of silence when the system was supposed to be playing a
song or track. This behavior was consistent with errors such as the
following being present in the playout log:
```
2025-01-15 14:01:28,331 | INFO     | libretime_playout.player.file:copy_file:47 - copying file 19834 to cache /var/lib/libretime/playout/scheduler/19834.mp3
2025-01-15 14:01:28,466 | ERROR    | libretime_playout.player.file:copy_file:77 - could not copy file 19834 to /var/lib/libretime/playout/scheduler/19834.mp3: 'usedforsecurity' is an invalid keyword argument for openssl_md5()
Traceback (most recent call last):
  File "/opt/libretime/lib/python3.8/site-packages/libretime_playout/player/file.py", line 70, in copy_file
    file_event.filesize = self.report_file_size_and_md5_to_api(
  File "/opt/libretime/lib/python3.8/site-packages/libretime_playout/player/file.py", line 89, in report_file_size_and_md5_to_api
    hasher = hashlib.md5(usedforsecurity=False)
TypeError: 'usedforsecurity' is an invalid keyword argument for openssl_md5()
```
_For more information about the characterization and results of this
problem, see issue #3134_

**Testing on running systems**
After the patch was applied, these errors were no longer seen. I first
tested this on a dev server, and then on a live server, with
approximately 100 distinct tracks of playout occurring over about 24
hours. There were no file copy failures, and no related playout
problems, which was a major and immediate improvement.

**Testing installer, fresh installs**
***Ubuntu 20.04***
I deployed a patch to the installer and installed it on a blank system
running Ubuntu 20.04 and tested it to make sure the fix was applied and
worked.

***Debian 11***
I deployed patch to the installer and installed it on a blank system
running Debian Bullseye (which runs python = 3.9) , and tested it there
to make sure it did not break anything or introduce a regression.


### **Links**

Closes: #3134
2025-01-17 23:11:02 +00:00
Kyle Robbertze a14f1bec0b
ci: only check last commit for API schema in PRs (#3133)
### Description

PRs are intended to be squashed to a single commit. Only checking the
last commit gives us the intended state of the repo and ensures that if
the author commits the schema fixes later, the CI passes as expected.
Currently, the CI will fail because the earlier commits still have an
out of date schema.
2025-01-10 16:56:39 +00:00
nosbig 203c927554
feat: add flac support to Web player (#3128)
### Description

Added support for previewing FLAC files in the web interface, provided
in #509 by marmotte32 on Github in the comments for this issue.

I have tested this against a script-installed copy of 4.2.0, and FLAC
preview is working, although auto-play isn't. I haven't tested to
confirm if this behavior matches MP3 and OGG uploads.

**This is a new feature**:

_Do the changes in this PR implement a new feature?_

**I have updated the documentation to reflect these changes**:

No changes needed; this bug is a missing file format in preview, and it
requires no updates to the documentation.

### Testing Notes

**What I did:**

I installed a LibreTime 4.2.0 system using the default installation
script against a fully-updated, brand new Debian 11 system. I logged
into the web interface, uploaded some FLAC files, and attempted to
preview them. They failed to preview.

I then replaced the preview_jplayer.js file with the contents in this PR
and then refreshed the page. I was able to preview the FLAC files and
hear the results in my local browser audio output.

**How you can replicate my testing:**

Perform the same steps above, or replace the same file in the
libretime_legacy_1 docker image to see the same results.

### **Links**

Closes: #509

---------

Co-authored-by: Kyle Robbertze <kyle@paddatrapper.com>
2025-01-10 15:46:18 +00:00
Kyle Robbertze 6f5275176e
chore: update docker compose commands (#3132)
### Description

Upstream has renamed docker-compose to docker compose for all commands

**This is a new feature**:

_Do the changes in this PR implement a new feature?_

**I have updated the documentation to reflect these changes**:

Yes
2025-01-09 16:09:28 +00:00
Scott McGrath 644d2b9ce5
fix(legacy): additional specifics added to CSVexport.js for RFC 4180 (#3131)
### Description

The existing implementation for exporting playout logs to a CSV file
incorporates a very simplified CSV format. Some aspects of the complete
[RFC](https://www.rfc-editor.org/rfc/rfc4180) are missing, such as
escaping of quotes, and quoting of fields that contain certain
characters. This is problematic for common office spreadsheet tools, and
practically, anything else. Many radio stations rely on this
functionality to work well for exporting playout data, for example, in
order to compile data for reporting requirements.

**This is a new feature**:

The changes in this PR add quoting of fields containing a comma, as well
as those containing a CR/LF. It also escapes quotes by doubling them.
I'm not sure it makes CSVexport.js completely RFC 4180 compliant, but it
is much closer than it was.

**I have updated the documentation to reflect these changes**:

I don't think there are any documentation changes necessary; this is
probably expected behavior for anyone trying to use the CSV exporter.

### Testing Notes

**What I did:**

To validate this, I did a clean install of Debian, cloned from the
official libretime repo, and applied the code as a patch to the
installer. I then proceeded with the install and then loaded a database
from a running system (so that I had some playout data to test with). I
then performed the playout history export and examined the resulting CSV
file and after seeing previously problematic fields properly quoted, was
convinced it looked the way I expected. I loaded the csv file into
Libreoffice Calc and did not see any errors.

**How you can replicate my testing:**

See "What I did" above, basically run the patch after cloning the
installer from the repo. You could also apply the changes to a running
system by applying the patch to the file:
/usr/share/libretime/legacy/public/js/libs/CSVexport.js
Be sure to clear your browser cache and do a hard reload of the web
interface, before re-testing.

### **Links**

Closes: #2477
2025-01-09 08:34:13 +00:00
Kyle Robbertze 267da9e438
chore: add pre-commit API check (#3120)
### Description

This is a way of ensuring the schema is up to date with every change.
This should be extended by fixing the PR api schema pipeline to squash
down all PR commits into a single change and checking the API schema for
that. Otherwise people will fix the schema after a failed pipeline and
the pipeline will continue to fail
2025-01-09 07:53:49 +00:00
Keoni Mahelona b1bdd6d9be
feat(api): added filters on genre & md5 for files api (#3127)
### 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
2025-01-08 16:54:53 +00:00
Kyle Robbertze 92ca6b0341
ci: make libretime test user owner of test database (#3130)
Fix the legacy tests
2025-01-08 16:53:45 +00:00
Weblate (bot) 7f40743d83
chore(legacy): translations update from Hosted Weblate (#3129)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: marmotte <serge@e.email>
2025-01-08 10:48:31 +00:00
Scott McGrath 82d5af2dfb
fix(legacy): migrations from airtime 2.5.1 (#3123)
### 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
2024-12-21 10:09:19 +00:00
libretime-bot cf172d5c7c chore(legacy): update locales 2024-12-09 02:37:27 +00:00
renovate[bot] f1c9ebf6f2
chore(deps): update dependency drf-spectacular to >=0.22.1,<0.29 (#3117)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[drf-spectacular](https://redirect.github.com/tfranzel/drf-spectacular)
| `>=0.22.1,<0.28` -> `>=0.22.1,<0.29` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/drf-spectacular/0.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/drf-spectacular/0.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/drf-spectacular/0.27.2/0.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/drf-spectacular/0.27.2/0.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>tfranzel/drf-spectacular (drf-spectacular)</summary>

###
[`v0.28.0`](https://redirect.github.com/tfranzel/drf-spectacular/blob/HEAD/CHANGELOG.rst#0280-2024-11-30)

[Compare
Source](https://redirect.github.com/tfranzel/drf-spectacular/compare/0.27.2...0.28.0)

- Fix lazy_reverse bug in views (`#&#8203;1339
<https://github.com/tfranzel/drf-spectacular/issues/1339>`\_)
- Extend query params explosion of non-DRF serializer `#&#8203;1315
<https://github.com/tfranzel/drf-spectacular/issues/1315>`\_
- consider pk_field on PrimaryKeyRelatedField when set `#&#8203;1335
<https://github.com/tfranzel/drf-spectacular/issues/1335>`\_
- fix unused OAuth2 scopes override `#&#8203;1319
<https://github.com/tfranzel/drf-spectacular/issues/1319>`\_
-   bugfix @&#8203;extend_schema_field raw schema already in OAS3.1
- some minors (resolves `#&#8203;1147
<https://github.com/tfranzel/drf-spectacular/issues/1147>`\_)
- fix OAS3.1 validator omission `#&#8203;1302
<https://github.com/tfranzel/drf-spectacular/issues/1302>`\_
- guard against broken **dir** impl `#&#8203;1296
<https://github.com/tfranzel/drf-spectacular/issues/1296>`\_
-   Add Django 5.1 as classifier \[jelmert]
-   No extra items in the oneOf list \[Vladimir]
- parametrize component registry identity `#&#8203;1288
<https://github.com/tfranzel/drf-spectacular/issues/1288>`\_
- make operation_id action position configurable `#&#8203;1264
<https://github.com/tfranzel/drf-spectacular/issues/1264>`\_
-   Fix for incorrect `issubclass()` check. \[Mike Moore]
- Correct the documentation of how to import extension snippets \[Alan
Crosswell]
-   Update OpenAPI docs links \[Nils Van Zuijlen]
- mitigate false positive in Django Debug Toolbar `#&#8203;1159
<https://github.com/tfranzel/drf-spectacular/issues/1159>`\_
-   Additional testcase \[Marti Raudsepp]
- Fix ChoiceField schema type with empty `choices=[]` \[Marti Raudsepp]
-   handle examples with nested properties pagination \[François Rejeté]
- add choice field display method handling `#&#8203;1228
<https://github.com/tfranzel/drf-spectacular/issues/1228>`\_
- Add support for stateless user authentication in SimpleJWT
(`#&#8203;1221
<https://github.com/tfranzel/drf-spectacular/issues/1221>`\_) \[Willem
Meints]
-   fix: set pydantic json mode to serialization \[Eric Butler]
-   fix: extend_schema_field with dict param and oas 3.1 \[Eric Butler]

Breaking changes / important additions:

-   Y-stream release due to the amount of small but important changes.
- Pydantic users might see a slightly different schema due to the change
in serialization method.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuNDIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicHl0aG9uIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-07 12:13:03 +00:00
dakriy 2985d8554a
feat(legacy): trused header sso auth (#3095)
### Description

Allows LibreTime to support Trusted Header SSO Authentication.

**This is a new feature**:

Yes

**I have updated the documentation to reflect these changes**:

Yes

### Testing Notes

**What I did:**

I spun up an Authelia/Traefik pair and configured them to protect
LibreTime according to Authelia's documentation, I then tested that you
could log in via the trusted headers, and tested that old methods of
authentication were not affected.

**How you can replicate my testing:**

Using the following `docker-compose.yml` file

```yml
services:
  postgres:
    image: postgres:15
    networks:
      - internal
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-libretime}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libretime} # Change me !
    healthcheck:
      test: pg_isready -U libretime

  rabbitmq:
    image: rabbitmq:3.13-alpine
    networks:
      - internal
    environment:
      RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_DEFAULT_VHOST:-/libretime}
      RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-libretime}
      RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-libretime} # Change me !
    healthcheck:
      test: nc -z 127.0.0.1 5672

  playout:
    image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    init: true
    ulimits:
      nofile: 1024
    depends_on:
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
      - libretime_playout:/app
    environment:
      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080

  liquidsoap:
    image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    command: /usr/local/bin/libretime-liquidsoap
    init: true
    ulimits:
      nofile: 1024
    ports:
      - 8001:8001
      - 8002:8002
    depends_on:
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
      - libretime_playout:/app
    environment:
      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080

  analyzer:
    image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    init: true
    ulimits:
      nofile: 1024
    depends_on:
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
      - libretime_storage:/srv/libretime
    environment:
      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080

  worker:
    image: ghcr.io/libretime/libretime-worker:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    init: true
    ulimits:
      nofile: 1024
    depends_on:
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
    environment:
      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080

  api:
    image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    init: true
    ulimits:
      nofile: 1024
    depends_on:
      - postgres
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
      - libretime_storage:/srv/libretime

  legacy:
    image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-latest}
    networks:
      - internal
    init: true
    ulimits:
      nofile: 1024
    depends_on:
      - postgres
      - rabbitmq
    volumes:
      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
      - libretime_assets:/var/www/html
      - libretime_storage:/srv/libretime

  nginx:
    image: nginx
    networks:
      - internal
      - net
    ports:
      - 8080:8080
    depends_on:
      - legacy
    volumes:
      - libretime_assets:/var/www/html:ro
      - libretime_storage:/srv/libretime:ro
      - ${NGINX_CONFIG_FILEPATH:-./nginx.conf}:/etc/nginx/conf.d/default.conf:ro
    labels:
      - 'traefik.enable=true'
      - 'traefik.docker.network=libretime_net'
      - 'traefik.http.routers.libretime.rule=Host(`libretime.example.com`)'
      - 'traefik.http.routers.libretime.entrypoints=https'
      - 'traefik.http.routers.libretime.tls=true'
      - 'traefik.http.routers.libretime.tls.options=default'
      - 'traefik.http.routers.libretime.middlewares=authelia@docker'
      - 'traefik.http.services.libretime.loadbalancer.server.port=8080'

  icecast:
    image: ghcr.io/libretime/icecast:2.4.4
    networks:
      - internal
    ports:
      - 8000:8000
    environment:
      ICECAST_SOURCE_PASSWORD: ${ICECAST_SOURCE_PASSWORD:-hackme} # Change me !
      ICECAST_ADMIN_PASSWORD: ${ICECAST_ADMIN_PASSWORD:-hackme} # Change me !
      ICECAST_RELAY_PASSWORD: ${ICECAST_RELAY_PASSWORD:-hackme} # Change me !

  traefik:
    image: traefik:v2.11.12
    container_name: traefik
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - net
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.api.rule=Host(`traefik.example.com`)'
      - 'traefik.http.routers.api.entrypoints=https'
      - 'traefik.http.routers.api.service=api@internal'
      - 'traefik.http.routers.api.tls=true'
      - 'traefik.http.routers.api.tls.options=default'
      - 'traefik.http.routers.api.middlewares=authelia@docker'
    ports:
      - '80:80'
      - '443:443'
    command:
      - '--api'
      - '--providers.docker=true'
      - '--providers.docker.exposedByDefault=false'
      - '--entrypoints.http=true'
      - '--entrypoints.http.address=:80'
      - '--entrypoints.http.http.redirections.entrypoint.to=https'
      - '--entrypoints.http.http.redirections.entrypoint.scheme=https'
      - '--entrypoints.https=true'
      - '--entrypoints.https.address=:443'
      - '--log=true'
      - '--log.level=DEBUG'

  authelia:
    image: authelia/authelia
    container_name: authelia
    networks:
      - net
    volumes:
      - ./authelia:/config
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.authelia.rule=Host(`auth.example.com`)'
      - 'traefik.http.routers.authelia.entrypoints=https'
      - 'traefik.http.routers.authelia.tls=true'
      - 'traefik.http.routers.authelia.tls.options=default'
      - 'traefik.http.middlewares.authelia.forwardauth.address=http://authelia:9091/api/authz/forward-auth'  # yamllint disable-line rule:line-length
      - 'traefik.http.middlewares.authelia.forwardauth.trustForwardHeader=true'
      - 'traefik.http.middlewares.authelia.forwardauth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email'  # yamllint disable-line rule:line-length
      - 'traefik.http.services.authelia.loadbalancer.server.port=9091'
    restart: unless-stopped
    environment:
      - TZ=America/Los_Angeles

volumes:
  postgres_data: {}
  libretime_storage: {}
  libretime_assets: {}
  libretime_playout: {}

networks:
  internal:
  net:
```

The following libretime dev config modification:
```yml
general:
  public_url: https://libretime.example.com
  auth: LibreTime_Auth_Adaptor_Header

header_auth:
  group_map:
    host: lt-host
    program_manager: lt-pm
    admin: lt-admin
    superadmin: lt-superadmin
```

And the following authelia config file:

```yml
---
###############################################################
#                   Authelia configuration                    #
###############################################################

server:
  address: 'tcp://:9091'
  buffers:
    read: 16384
    write: 16384

log:
  level: 'debug'

totp:
  issuer: 'authelia.com'

identity_validation:
  reset_password:
    jwt_secret: 'a_very_important_secret'

authentication_backend:
  file:
    path: '/config/users_database.yml'

access_control:
  default_policy: 'deny'
  rules:
    - domain: 'traefik.example.com'
      policy: 'one_factor'
    - domain: 'libretime.example.com'
      policy: 'one_factor'

session:
  secret: 'insecure_session_secret'

  cookies:
    - name: 'authelia_session'
      domain: 'example.com'  # Should match whatever your root protected domain is
      authelia_url: 'https://auth.example.com'
      expiration: '1 hour'  # 1 hour
      inactivity: '5 minutes'  # 5 minutes

regulation:
  max_retries: 3
  find_time: '2 minutes'
  ban_time: '5 minutes'

storage:
  encryption_key: 'you_must_generate_a_random_string_of_more_than_twenty_chars_and_configure_this'
  local:
    path: '/config/db.sqlite3'

notifier:
  filesystem:
    filename: '/config/notification.txt'
...
```

And the following authelia users database:

```yml
---
###############################################################
#                         Users Database                      #
###############################################################

# This file can be used if you do not have an LDAP set up.

# List of users
users:
  test:
    disabled: false
    displayname: "First Last"
    password: "$argon2id$v=19$m=16,t=2,p=1$SWVVVzcySlRLUEFkWWh2eA$qPs1ZmzmDXR/9WckDzIN9Q"
    email: test@example.com
    groups:
      - admins
      - dev
      - lt-admin
...
```

add the following entries to your `hosts` file:

```
127.0.0.1 traefik.example.com
127.0.0.1 auth.example.com
127.0.0.1 libretime.example.com
```

Then visit `libretime.example.com` in your browser, and login as the
user `test` with password of `password`. You should then be taken to the
LibreTime homepage, and when you click on login, you should be
automatically logged in.

### **Links**

https://www.authelia.com/integration/trusted-header-sso/introduction/
https://doc.traefik.io/traefik/middlewares/http/forwardauth/

---------

Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>
2024-12-07 10:21:57 +00:00
Weblate (bot) f709c5026d
chore(legacy): translations update from Hosted Weblate (#3116)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: gfbdrgng <hnaofegnp@hldrive.com>
2024-12-07 10:12:20 +00:00
Kyle Robbertze 38a0bf98b2 fix: regenerate API schema 2024-12-07 10:06:24 +00:00
renovate[bot] 3be4bd7da1
chore(deps): update pre-commit hook adamchainz/django-upgrade to v1.22.2 (#3119)
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 #&#8203;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>
2024-12-04 10:22:41 +00:00
renovate[bot] c0bb7df0ed
chore(deps): lock file maintenance (legacy/composer.json) (#3118)
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>
2024-12-03 06:39:40 +00:00
renovate[bot] d09bf04379
chore(deps): lock file maintenance (legacy/composer.json) (#3115)
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>
2024-11-26 06:13:26 +00:00
dakriy 02a779b413
feat(analyzer): parse comment fields from mp3 files (#3082)
### 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>
2024-11-22 18:28:06 +00:00
Kyle Robbertze ce257a1f35 fix: regenerate API schema 2024-11-22 18:21:03 +00:00
Weblate (bot) 1939b0aec0
chore(legacy): translations update from Hosted Weblate (#3112)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-11-18 20:35:19 +00:00
Thomas Göttgens 2ac7e8a506
feat(api): enable writes to schedule table (#3109)
this fixes #3088

---------

Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>
2024-11-18 16:10:54 +00:00
renovate[bot] 824f6d2f1b
chore(deps): update codecov/codecov-action action to v5 (#3111)
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>
2024-11-16 00:29:08 +00:00
Weblate (bot) 013d68e880
chore(legacy): translations update from Hosted Weblate (#3110)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-11-14 00:00:22 +00:00
renovate[bot] 83b56f9cd0
chore(deps): update lycheeverse/lychee-action action to v2.1.0 (#3108)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[lycheeverse/lychee-action](https://redirect.github.com/lycheeverse/lychee-action)
| action | minor | `v2.0.2` -> `v2.1.0` |

---

### Release Notes

<details>
<summary>lycheeverse/lychee-action (lycheeverse/lychee-action)</summary>

###
[`v2.1.0`](https://redirect.github.com/lycheeverse/lychee-action/releases/tag/v2.1.0):
Version 2.1.0

[Compare
Source](https://redirect.github.com/lycheeverse/lychee-action/compare/v2.0.2...v2.1.0)

#### What's Changed

- Add missing argument `failIfEmpty` by
[@&#8203;LitoMore](https://redirect.github.com/LitoMore) in
[https://github.com/lycheeverse/lychee-action/pull/261](https://redirect.github.com/lycheeverse/lychee-action/pull/261)
- Fix bugs about the exit code by
[@&#8203;YDX-2147483647](https://redirect.github.com/YDX-2147483647) in
[https://github.com/lycheeverse/lychee-action/pull/262](https://redirect.github.com/lycheeverse/lychee-action/pull/262)
- Bump lychee version to 0.17.0 by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/263](https://redirect.github.com/lycheeverse/lychee-action/pull/263)

#### New Contributors

- [@&#8203;LitoMore](https://redirect.github.com/LitoMore) made their
first contribution in
[https://github.com/lycheeverse/lychee-action/pull/261](https://redirect.github.com/lycheeverse/lychee-action/pull/261)
- [@&#8203;YDX-2147483647](https://redirect.github.com/YDX-2147483647)
made their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/262](https://redirect.github.com/lycheeverse/lychee-action/pull/262)

**Full Changelog**:
https://github.com/lycheeverse/lychee-action/compare/v2...v2.1.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImNpIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 18:08:43 +00:00
renovate[bot] c4e10ed861 chore(deps): lock file maintenance (legacy/composer.json) 2024-10-29 09:42:02 +00:00
libretime-bot 8d80e70580 chore(legacy): update locales 2024-10-28 02:21:53 +00:00
Weblate (bot) 26db439d34
chore(legacy): translations update from Hosted Weblate (#3105)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
2024-10-26 17:03:52 +01:00
renovate[bot] 380c6d0944 chore(deps): update pre-commit hook asottile/pyupgrade to v3.19.0 2024-10-23 11:21:05 +00:00
Thomas Göttgens 7992a9be2d
fix: intro/outro playlist unset was impossible (#3101)
this reinstates the boolean fields in the database from the original PR
to work around a foreign key contraint. THE UI remains unchanged
2024-10-21 18:34:39 +01:00
libretime-bot 2870857abc chore(legacy): update locales 2024-10-21 02:20:09 +00:00
Thomas Göttgens 0b221f4fff
fix(legacy): support Postgresql 12 syntax (#3103)
fixes #3102
2024-10-19 23:20:30 +01:00
renovate[bot] 188cd5d671
chore(deps): update dependency uvicorn to >=0.17.6,<0.33.0 (#3096)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [uvicorn](https://redirect.github.com/encode/uvicorn)
([changelog](https://redirect.github.com/encode/uvicorn/blob/master/CHANGELOG.md))
| `>=0.17.6,<0.32.0` -> `>=0.17.6,<0.33.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/uvicorn/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/uvicorn/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/uvicorn/0.31.1/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/uvicorn/0.31.1/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>encode/uvicorn (uvicorn)</summary>

###
[`v0.32.0`](https://redirect.github.com/encode/uvicorn/blob/HEAD/CHANGELOG.md#0320-2024-10-15)

[Compare
Source](https://redirect.github.com/encode/uvicorn/compare/0.31.1...0.32.0)

##### Added

- Officially support Python 3.13
([#&#8203;2482](https://redirect.github.com/encode/uvicorn/issues/2482))
- Warn when `max_request_limit` is exceeded
([#&#8203;2430](https://redirect.github.com/encode/uvicorn/issues/2430))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJweXRob24iXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-17 17:49:25 +01:00
Weblate (bot) 74da2ef0b4
chore(legacy): translations update from Hosted Weblate (#3099)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg)

Co-authored-by: Maurizio Castelvetro <castelvetro@gmail.com>
2024-10-17 17:49:06 +01:00
renovate[bot] 08b85a44bc chore(deps): lock file maintenance (legacy/composer.json) 2024-10-17 08:23:20 +00:00
renovate[bot] 2f0422b1ae chore(deps): update lycheeverse/lychee-action action to v2.0.2 2024-10-16 00:51:33 +00:00
renovate[bot] 9ce88538d3 chore(deps): update pre-commit hook asottile/pyupgrade to v3.18.0 2024-10-15 22:03:30 +00:00
Thomas Göttgens 299be3c142
feat: use custom intro/outro playlists per show (#2941)
### 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>
2024-10-14 21:07:41 +01:00
dakriy 5b5c68c628
feat(legacy): implement subset sum solution to show scheduling (#3019)
### 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
2024-10-13 15:31:08 +02:00
dakriy 16deaf08c6
feat(legacy): show filename and size on edit page and add filename datatable column (#3083)
### 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
2024-10-13 08:45:54 +01:00
renovate[bot] 6d474c2733 chore(deps): update pre-commit hook adamchainz/django-upgrade to v1.22.1 2024-10-12 15:04:49 +00:00
renovate[bot] 2202618150
chore(deps): update lycheeverse/lychee-action action to v2 (#3091)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[lycheeverse/lychee-action](https://redirect.github.com/lycheeverse/lychee-action)
| action | major | `v1.10.0` -> `v2.0.0` |

---

### Release Notes

<details>
<summary>lycheeverse/lychee-action (lycheeverse/lychee-action)</summary>

###
[`v2.0.0`](https://redirect.github.com/lycheeverse/lychee-action/releases/tag/v2.0.0):
Version 2.0.0

[Compare
Source](https://redirect.github.com/lycheeverse/lychee-action/compare/v1.10.0...v2.0.0)

#### Breaking Changes

**Note:** This release improves the action's robustness by changing
default behaviors. Changes are only required if you want to opt out of
the new failure conditions. Most users won't need to modify their
existing configurations.

##### Fail pipeline on error by default

We've changed the default behavior: pipelines will now fail on broken
links automatically. This addresses user feedback that not failing on
broken links was unexpected (see [issue
#&#8203;71](https://redirect.github.com/lycheeverse/lychee-action/issues/71)).

**What you need to do:**

-   Update to version 2 of this action to apply this change.
- Users of the `lychee-action@master` branch don't need to make any
changes, as `fail: true` has been the default there for a while.
- If you prefer the old behavior, explicitly set `fail` to `false` when
updating:

```yaml
- name: Link Checker
  id: lychee
  uses: lycheeverse/lychee-action@v2
  with:
    fail: false  # Don't fail action on broken links
```

##### Fail pipeline if no links were found

Similar to the above change, we now fail the pipeline if no links are
found during a run. This helps warn users about potential configuration
issues.

**What you need to do:**

- If you expect links to be found in your pipeline run, you don't need
to do anything.
- If you expect no links in your pipeline run, you can opt out like
this:

```yaml
- name: Link Checker
  id: lychee
  uses: lycheeverse/lychee-action@v2
  with:
    failIfEmpty: false  # Don't fail action if no links were found
```

For a more detailed description of the technical aspects behind these
changes, please see the full changelog below.

#### What's Changed

- feat: change to use the full version tag with v-\* prefix by
[@&#8203;kemingy](https://redirect.github.com/kemingy) in
[https://github.com/lycheeverse/lychee-action/pull/204](https://redirect.github.com/lycheeverse/lychee-action/pull/204)
- Add `failIfEmpty` argument (fixes
[#&#8203;84](https://redirect.github.com/lycheeverse/lychee-action/issues/84))
by [@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/86](https://redirect.github.com/lycheeverse/lychee-action/pull/86)
- Fail pipeline on error by default (fixes
[#&#8203;71](https://redirect.github.com/lycheeverse/lychee-action/issues/71))
by [@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/85](https://redirect.github.com/lycheeverse/lychee-action/pull/85)
- Exit in case output is set in args and action input by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/227](https://redirect.github.com/lycheeverse/lychee-action/pull/227)
- v1 will automatically use latest version by
[@&#8203;jacobdalamb](https://redirect.github.com/jacobdalamb) in
[https://github.com/lycheeverse/lychee-action/pull/228](https://redirect.github.com/lycheeverse/lychee-action/pull/228)
- Remove unneeded text by
[@&#8203;jacobdalamb](https://redirect.github.com/jacobdalamb) in
[https://github.com/lycheeverse/lychee-action/pull/229](https://redirect.github.com/lycheeverse/lychee-action/pull/229)
- Clarify README.md defaults by
[@&#8203;paddyroddy](https://redirect.github.com/paddyroddy) in
[https://github.com/lycheeverse/lychee-action/pull/230](https://redirect.github.com/lycheeverse/lychee-action/pull/230)
- Adjust for new asset naming scheme by
[@&#8203;dscho](https://redirect.github.com/dscho) in
[https://github.com/lycheeverse/lychee-action/pull/234](https://redirect.github.com/lycheeverse/lychee-action/pull/234)
- Test various lychee versions by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/235](https://redirect.github.com/lycheeverse/lychee-action/pull/235)
- Better cleanup of old lychee assets by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/237](https://redirect.github.com/lycheeverse/lychee-action/pull/237)
- Bump peter-evans/create-issue-from-file from v4 to v5 by
[@&#8203;AndreiCherniaev](https://redirect.github.com/AndreiCherniaev)
in
[https://github.com/lycheeverse/lychee-action/pull/241](https://redirect.github.com/lycheeverse/lychee-action/pull/241)
- Remove dots from table by
[@&#8203;AndreiCherniaev](https://redirect.github.com/AndreiCherniaev)
in
[https://github.com/lycheeverse/lychee-action/pull/242](https://redirect.github.com/lycheeverse/lychee-action/pull/242)
- README: update actions/cache to v4 by
[@&#8203;sebastiaanspeck](https://redirect.github.com/sebastiaanspeck)
in
[https://github.com/lycheeverse/lychee-action/pull/243](https://redirect.github.com/lycheeverse/lychee-action/pull/243)
- Set exit_code correctly as output by
[@&#8203;sebastiaanspeck](https://redirect.github.com/sebastiaanspeck)
in
[https://github.com/lycheeverse/lychee-action/pull/245](https://redirect.github.com/lycheeverse/lychee-action/pull/245)
- action: fix failing CI by
[@&#8203;sebastiaanspeck](https://redirect.github.com/sebastiaanspeck)
in
[https://github.com/lycheeverse/lychee-action/pull/246](https://redirect.github.com/lycheeverse/lychee-action/pull/246)
- Split up steps in action by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/248](https://redirect.github.com/lycheeverse/lychee-action/pull/248)
- Bump version to 0.16.x, respect new tag names by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/249](https://redirect.github.com/lycheeverse/lychee-action/pull/249)
- Test latest lychee version tag by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/236](https://redirect.github.com/lycheeverse/lychee-action/pull/236)

#### New Contributors

- [@&#8203;kemingy](https://redirect.github.com/kemingy) made their
first contribution in
[https://github.com/lycheeverse/lychee-action/pull/204](https://redirect.github.com/lycheeverse/lychee-action/pull/204)
- [@&#8203;paddyroddy](https://redirect.github.com/paddyroddy) made
their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/230](https://redirect.github.com/lycheeverse/lychee-action/pull/230)
- [@&#8203;dscho](https://redirect.github.com/dscho) made their first
contribution in
[https://github.com/lycheeverse/lychee-action/pull/234](https://redirect.github.com/lycheeverse/lychee-action/pull/234)
- [@&#8203;AndreiCherniaev](https://redirect.github.com/AndreiCherniaev)
made their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/241](https://redirect.github.com/lycheeverse/lychee-action/pull/241)
- [@&#8203;sebastiaanspeck](https://redirect.github.com/sebastiaanspeck)
made their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/243](https://redirect.github.com/lycheeverse/lychee-action/pull/243)

**Full Changelog**:
https://github.com/lycheeverse/lychee-action/compare/v1...v1.11.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTQuMCIsInVwZGF0ZWRJblZlciI6IjM4LjExNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJjaSIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-10 10:17:10 +01:00
renovate[bot] ba69de0a2b chore(deps): update pre-commit hook psf/black-pre-commit-mirror to v24.10.0 2024-10-09 04:05:54 +00:00
dakriy 32cad0faa4
fix(analyzer): make ffmpeg filters less aggressive (#3086)
### 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
2024-10-07 20:55:18 +01:00
renovate[bot] 2643813fb7 chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v5 2024-10-07 03:56:39 +00:00
renovate[bot] a37050df9e
chore(deps): update dependency uvicorn to >=0.17.6,<0.32.0 (#3081)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [uvicorn](https://redirect.github.com/encode/uvicorn)
([changelog](https://redirect.github.com/encode/uvicorn/blob/master/CHANGELOG.md))
| `>=0.17.6,<0.31.0` -> `>=0.17.6,<0.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/uvicorn/0.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/uvicorn/0.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/uvicorn/0.30.6/0.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/uvicorn/0.30.6/0.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>encode/uvicorn (uvicorn)</summary>

###
[`v0.31.0`](https://redirect.github.com/encode/uvicorn/blob/HEAD/CHANGELOG.md#0310-2024-09-27)

[Compare
Source](https://redirect.github.com/encode/uvicorn/compare/0.30.6...0.31.0)

##### Added

Improve `ProxyHeadersMiddleware`
([#&#8203;2468](https://redirect.github.com/encode/uvicorn/issues/2468))
and
([#&#8203;2231](https://redirect.github.com/encode/uvicorn/issues/2231)):

- Fix the host for requests from clients running on the proxy server
itself.
- Fallback to host that was already set for empty x-forwarded-for
headers.
- Also allow to specify IP Networks as trusted hosts. This greatly
simplifies deployments
on docker swarm/kubernetes, where the reverse proxy might have a dynamic
IP.
    -   This includes support for IPv6 Address/Networks.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicHl0aG9uIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 16:32:04 +01:00
Kyle Robbertze bac903f4e5
chore: update django-stubs version (#3085)
Upstream has fixed the issue.

Closes: #3064
2024-09-30 16:15:28 +01:00
Kyle Robbertze 81e8fa90ed
chore: fix linting ignore comments (#3084)
### Description

There is now a too-many-positional-arguments check
2024-09-30 16:08:23 +01:00
renovate[bot] 004b784d09 chore(deps): lock file maintenance (legacy/composer.json) 2024-09-17 09:26:00 +00:00