libretime-bot 183d49742b
chore(main): release 4.3.0 (#3049)
🤖 I have created a release *beep* *boop*
---


## [4.3.0](https://github.com/libretime/libretime/compare/4.2.0...4.3.0)
(2025-03-12)


### Features

* add flac support to Web player
([#3128](https://github.com/libretime/libretime/issues/3128))
([203c927](203c927554))
* add Norwegian Bokmål locale
([#3073](https://github.com/libretime/libretime/issues/3073))
([e614fbc](e614fbcf6c))
* **analyzer:** parse comment fields from mp3 files
([#3082](https://github.com/libretime/libretime/issues/3082))
([02a779b](02a779b413))
* **api:** added filters on genre & md5 for files api
([#3127](https://github.com/libretime/libretime/issues/3127))
([b1bdd6d](b1bdd6d9be))
* **api:** enable writes to schedule table
([#3109](https://github.com/libretime/libretime/issues/3109))
([2ac7e8a](2ac7e8a506))
* **legacy:** implement subset sum solution to show scheduling
([#3019](https://github.com/libretime/libretime/issues/3019))
([5b5c68c](5b5c68c628)),
closes [#3018](https://github.com/libretime/libretime/issues/3018)
* **legacy:** order by filename when lptime is null
([#3069](https://github.com/libretime/libretime/issues/3069))
([8c26505](8c26505622))
* **legacy:** show filename and size on edit page and add filename
datatable column
([#3083](https://github.com/libretime/libretime/issues/3083))
([16deaf0](16deaf08c6)),
closes [#3053](https://github.com/libretime/libretime/issues/3053)
* **legacy:** trused header sso auth
([#3095](https://github.com/libretime/libretime/issues/3095))
([2985d85](2985d8554a))
* **legacy:** update deprecated PHP code
([#2789](https://github.com/libretime/libretime/issues/2789))
([3a8dcbc](3a8dcbce60))
* **playout:** add Liquidsoap 2.0 support
([#2786](https://github.com/libretime/libretime/issues/2786))
([f9c0bd5](f9c0bd5a05))
* use custom intro/outro playlists per show
([#2941](https://github.com/libretime/libretime/issues/2941))
([299be3c](299be3c142))


### Bug Fixes

* add missing file for nb_NO locale
([#3075](https://github.com/libretime/libretime/issues/3075))
([a3865aa](a3865aa6ee))
* **analyzer:** make ffmpeg filters less aggressive
([#3086](https://github.com/libretime/libretime/issues/3086))
([32cad0f](32cad0faa4)),
closes [#2629](https://github.com/libretime/libretime/issues/2629)
* docker warnings "keywords casing do not match"
([#3048](https://github.com/libretime/libretime/issues/3048))
([e095cb2](e095cb2a5f))
* intro/outro playlist unset was impossible
([#3101](https://github.com/libretime/libretime/issues/3101))
([7992a9b](7992a9be2d))
* **legacy:** additional specifics added to CSVexport.js for RFC 4180
([#3131](https://github.com/libretime/libretime/issues/3131))
([644d2b9](644d2b9ce5)),
closes [#2477](https://github.com/libretime/libretime/issues/2477)
* **legacy:** fix filename criteria searching
([#3068](https://github.com/libretime/libretime/issues/3068))
([c883d0f](c883d0f2d5))
* **legacy:** migrations from airtime 2.5.1
([#3123](https://github.com/libretime/libretime/issues/3123))
([82d5af2](82d5af2dfb))
* **legacy:** support Postgresql 12 syntax
([#3103](https://github.com/libretime/libretime/issues/3103))
([0b221f4](0b221f4fff)),
closes [#3102](https://github.com/libretime/libretime/issues/3102)
* **playout:** improve the way hashlib is called in
libretime_playout/player
([#3135](https://github.com/libretime/libretime/issues/3135))
([5b4c720](5b4c720e10)),
closes [#3134](https://github.com/libretime/libretime/issues/3134)
* regenerate API schema
([38a0bf9](38a0bf98b2))
* regenerate API schema
([ce257a1](ce257a1f35))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2025-03-12 23:31:06 +00:00
..
2023-01-16 08:42:23 +02:00
2023-02-26 19:09:51 +02:00
2025-03-12 23:31:06 +00:00

Shared

The libretime_shared package contains reusable functions and classes for the LibreTime project.

Usage

This library assumes that:

  • You will use Click to build a CLI for your app.
  • You will use Pydantic to validate objects in your app.

Configuration

First define a schema for your configuration in order to validate it. A schema is a class that inherit from pydantic.BaseModel. Some existing schemas can be reused such as libretime_shared.config.RabbitMQ or libretime_shared.config.Database.

Load your configuration using a subclass of libretime_shared.config.BaseConfig.

from pydantic import BaseModel

from libretime_shared.config import RabbitMQConfig, BaseConfig

class AnalyzerConfig(BaseModel):
    bpm_enabled: bool = False
    bpm_track_max_length: int

class Config(BaseConfig):
    rabbitmq: RabbitMQConfig
    analyzer: AnalyzerConfig

config = Config("/etc/libretime/config.yml")

Don't instantiate a sub model if it has a required field, otherwise the Config class import will raise a ValidationError.

CLI

Decorate your CLI commands with the shared decorators to add extra flags.

import click
from libretime_shared.cli import cli_logging_options, cli_config_options

from .app import App

@click.group()
def cli():
    pass

@cli.command()
@cli_config_options()
@cli_logging_options()
def run(**kwargs):
    app = App(**kwargs)
    return app.run()