Commit Graph

45 Commits

Author SHA1 Message Date
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
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
Jonas L 29f73e0dcb
fix(analyzer): backslash non utf-8 data when probing replaygain (#2931)
### Description

Fixes #2910
2024-02-02 20:44:15 +01:00
renovate[bot] 7a3fffd45f
chore(deps): update pre-commit hook psf/black-pre-commit-mirror to v24 (#2917)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[psf/black-pre-commit-mirror](https://togithub.com/psf/black-pre-commit-mirror)
| repository | major | `23.12.1` -> `24.1.1` |

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://togithub.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>psf/black-pre-commit-mirror
(psf/black-pre-commit-mirror)</summary>

###
[`v24.1.1`](https://togithub.com/psf/black-pre-commit-mirror/compare/24.1.0...24.1.1)

[Compare
Source](https://togithub.com/psf/black-pre-commit-mirror/compare/24.1.0...24.1.1)

###
[`v24.1.0`](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.0)

[Compare
Source](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.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 becomes conflicted, 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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
2024-02-02 20:24:25 +01:00
jo b7214b5d46 feat: add sentry sdk 2023-03-14 14:59:45 +00:00
jo a60d83311b feat: add python packages version 2023-03-14 14:59:45 +00:00
jo 861698987c refactor: don't use f-string on logging statements
The strings are now be formatted if the logging level is enabled.
2023-02-26 19:09:51 +02:00
jo c6940db289 feat: replace loguru with logging 2023-02-26 19:09:51 +02:00
jo 87de25052a cuepoints analyzer disabled by default 2023-02-15 10:13:32 +02:00
jo f5e46c6f3d feat: configure cue points analysis per track type 2023-02-15 10:13:32 +02:00
jo 3a9ca109c3 refactor(analyzer): split analyze_cuepoint steps 2023-02-15 10:13:32 +02:00
jo bd76971312 style: format code using black 2023-02-01 11:17:49 +01:00
jo 0e1dfaa9ff refactor: upgrade code to Python 3.8 2022-10-11 09:28:52 +02:00
jo 448cff7600 feat: drop Ubuntu Bionic support
Fixes #2035
2022-10-10 20:11:33 +02:00
Jonas L 1147853c63
feat(shared): pass config data via init (#2042) 2022-08-12 15:12:39 +02:00
jo dc30d8836b refactor(analyzer): rewrite analyze playability 2022-08-09 21:07:07 +02:00
jo 04e5a7e404 feat(analyzer): override paths using env variables
Allow overriding FFMPEG, FFPROBE, or LIQUIDSOAP paths using env variables.
2022-08-09 21:07:07 +02:00
Jonas L 1b93b7645e
refactor(analyzer): fix linting errors (#2029) 2022-08-09 20:49:04 +02:00
Jonas L 067b35e9bb
feat(analyzer): load callback details from config and file_id (#1993) 2022-07-26 14:19:22 +02:00
jo 7bd369f20c refactor(analyzer): fix linting 2022-07-25 21:24:47 +02:00
jo 0babe0f243 chore(analyzer): clean old comments 2022-07-25 21:24:47 +02:00
jo 58230b7974 refactor(analyzer): remove unused import 2022-07-25 21:24:47 +02:00
jo fc53636c37 fix(analyzer): remove outdated urllib3 workaround 2022-07-25 21:24:47 +02:00
jo be9f36dbdc feat(analyzer): move compute_md5 to shared library 2022-06-28 19:05:14 +02:00
Jonas L d098671f3b
feat: replace click envar with auto_envvar_prefix (#1829) 2022-05-05 09:41:32 +02:00
jo 977b499d5e fix(analyzer): update docstring for organise_file 2022-02-20 22:11:00 +02:00
jo d4ffaf9a89 feat(analyzer): rework organise_file using pathlib
- use uuids instead of datetime
- massively using pathlib to manipulate paths
2022-02-20 22:03:59 +02:00
jo 88dcd13fc8 feat(analyzer): rework analyze_metadata step
- Upgrade mutagen to 1.45.1
- Remove custom wave data extraction
- Add .wav and ogg without extension fixtures
- Move md5 sum and mime type in there own function
- Cleanup comments
- Let analyze_cuepoints handle cuein and cueout metadata
- Remove python magic mime guessing
2022-02-16 10:13:00 +02:00
Jonas L 0106b4c6cb
fix(analyzer): remove bad attributes in shutdown handler (#1605)
Fixes #1278
2022-02-15 16:40:01 +02:00
jo 29511cfd2d test(analyzer): fix inconsistent return statement 2022-02-15 16:39:04 +02:00
jo c6124b4012 chore(analyzer): move ffmpeg and utils modules to pipeline 2022-02-15 16:39:04 +02:00
jo 8040d9a6c5 feat(analyzer): do verify ssl certs on requests
BREAKING CHANGE: Analyzer no longer ignore certificate verification when
performing a request. We recommand using Letsencrypt to get a certificat.
If you do rely on self signed certificat, please read the requests
documentation to provide a CA Bundle to verify the cert using
environement variables.
2022-02-14 12:44:17 +02:00
Jonas L cba905e367
refactor(analyzer): improve analyzer pipeline module (#1542)
* rename steps to pipeline module

* move pipeline entrypoint to pipeline module

* rename steps test module to pipeline

* fix paths after renames

* move step protocol to pipeline

* create pipeline status enum

* use Protocol from typing extensions

* Fix linting
2022-01-28 07:09:19 +02:00
jo 32cb67806a chore: add pyupgrade pre-commit hook
- add --py3-plus flag to pyupgrade hook
- add --py36-plus flag to pyupgrade hook
2022-01-27 10:37:48 +02:00
Jonas L 1924919e18
fix(shared): type is required for default config submodel (#1536)
We cannot load submodels values from environment variables without having the submodel type annotations.
2022-01-24 15:24:16 +02:00
jo d93fb44356 feat(analyzer): analyze cuepoint using ffmpeg
- store cue(in|out) as strings
- reraise when executable was not found

BREAKING CHANGE: The analyzer requires 'ffmpeg'. The 'silan' system dependency can be removed.
2022-01-24 12:54:31 +02:00
jo ceab19271d feat(analyzer): analyze replaygain using ffmpeg
- remove pycairo pip install
- fix py36 compatibility
- reraise when executable was not found

BREAKING CHANGE: The analyzer requires 'ffmpeg'. The 'rgain3' python package and it's system dependencies can be removed.
2022-01-24 12:54:31 +02:00
jo aa2d1ff4c7 refactor(analyzer): simplify entrypoint
The AbstractApp only make it more complex.
2022-01-21 11:54:00 +02:00
jo 35d38df9d3 feat(analyzer): load config using shared helpers
- make rabbitmq config optional
2022-01-21 11:54:00 +02:00
Jonas L 1561353b20
feat(shared): allow cli parametrized decorators (#1527) 2022-01-20 07:30:35 +02:00
jo 2cae31a97a refactor(analyzer): redefine *_analyzer into steps
- update imports and names
- define step as a protocol
- extract analyzer function from classes
2022-01-18 11:18:19 +02:00
jo f6a52c8324 refactor(analyzer): rename analyzer files 2022-01-18 11:18:19 +02:00
Jonas L fe0b2c4a7a
feat(analyzer): enhance analyzer cli and logging (#1507)
Some initial work on modernizing the analyzer app. This replace any custom logger or `logging` based logger with the logging tools from `libretime_shared.logging` and `loguru`.

- rename cli to main
- use pathlib in setup.py
- add api-client and shared package as dev deps
- rework main entrypoint cli to use click and shared helpers
- remove unused imports
- replace logging with logger
- rework analyzer app using shared abstract app
- move analyzer log path to systemd service
- change analyzer working dir

BREAKING CHANGE: The analyzer cli has been reworked and uses new flags / environnement variables for configuration.
`--debug` flag becomes `--log-level <level>`
`--rmq-config-file` flag becomes `--config <filepath>`
`--http-retry-queue-file` flag becomes `--retry-queue-filepath`.
`retry-queue-filepath` default value changed from `/tmp/airtime_analyzer_http_retries` to `retry_queue` in the working dir.
`LIBRETIME_CONF_DIR` environnement variable replaced by `LIBRETIME_CONFIG_FILEPATH`.

BREAKING CHANGE: When running analyzer as a systemd service, the working directory is now /var/lib/libretime/analyzer.
2022-01-17 10:26:30 +02:00
jo 02efadc3d0 chore: fixes after libretime_analyzer rename 2022-01-04 09:18:58 +02:00
jo 62476de478 chore: rename airtime_analyzer dir to libretime_analyzer 2022-01-04 09:18:58 +02:00