feat: drop Ubuntu Bionic support

Fixes #2035
This commit is contained in:
jo 2022-09-09 19:52:46 +02:00 committed by Kyle Robbertze
parent 26bcb6a90d
commit 448cff7600
21 changed files with 54 additions and 196 deletions

View file

@ -94,9 +94,8 @@ def compute_silences(filepath: Path) -> List[Tuple[float, float]]:
end = float(match.group(2))
ends.append(end)
# ffmpeg v3 (bionic) does not warn about silence end when the track ends.
# Set the last silence ending to infinity, and clamp it to the track duration before
# using this value.
# If one end is missing, set the last silence ending to infinity, and
# clamp it to the track duration before using this value.
if len(starts) - 1 == len(ends):
ends.append(inf)

View file

@ -1,32 +1,17 @@
# This file contains a list of package dependencies.
[python]
python3 = buster, bullseye, bookworm, bionic, focal, jammy
python3-pip = buster, bullseye, bookworm, bionic, focal, jammy
python3-pika = buster, bullseye, bookworm, bionic, focal, jammy
python3 = buster, bullseye, bookworm, focal, jammy
python3-pip = buster, bullseye, bookworm, focal, jammy
python3-pika = buster, bullseye, bookworm, focal, jammy
[liquidsoap]
# https://github.com/savonet/liquidsoap/blob/main/CHANGES.md
liquidsoap-plugin-alsa = bionic
liquidsoap-plugin-ao = bionic
liquidsoap-plugin-ogg = bionic
liquidsoap-plugin-portaudio = bionic
# Already recommended packages in bionic
# See `apt show liquidsoap`
; liquidsoap-plugin-faad = bionic
; liquidsoap-plugin-flac = bionic
; liquidsoap-plugin-icecast = bionic
; liquidsoap-plugin-lame = bionic
; liquidsoap-plugin-mad = bionic
; liquidsoap-plugin-pulseaudio = bionic
; liquidsoap-plugin-taglib = bionic
; liquidsoap-plugin-voaacenc = bionic
; liquidsoap-plugin-vorbis = bionic
liquidsoap = buster, bullseye, bookworm, bionic, focal, jammy
liquidsoap = buster, bullseye, bookworm, focal, jammy
[ffmpeg]
# Detect duration, silences and replaygain
ffmpeg = buster, bullseye, bookworm, bionic, focal, jammy
ffmpeg = buster, bullseye, bookworm, focal, jammy
[=development]
# Generate fixtures
ffmpeg = buster, bullseye, bookworm, bionic, focal, jammy
ffmpeg = buster, bullseye, bookworm, focal, jammy

View file

@ -1,4 +1,3 @@
import distro
import pytest
from libretime_analyzer.pipeline.analyze_cuepoint import analyze_cuepoint
@ -18,10 +17,6 @@ from ..fixtures import FILES
def test_analyze_cuepoint(filepath, length, cuein, cueout):
metadata = analyze_cuepoint(filepath, {})
# On bionic, large file duration is a wrong.
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
return
assert metadata["length_seconds"] == pytest.approx(length, abs=0.1)
assert float(metadata["cuein"]) == pytest.approx(float(cuein), abs=1)
assert float(metadata["cueout"]) == pytest.approx(float(cueout), abs=1)

View file

@ -1,6 +1,5 @@
from pathlib import Path
import distro
import pytest
from libretime_analyzer.pipeline.analyze_metadata import analyze_metadata
@ -28,12 +27,6 @@ def test_analyze_metadata(filepath: Path, metadata: dict):
del metadata["length"]
del found["length"]
# Mutagen <1.46 computes a wrong bit_rate for wav files, this version
# of mutagen is only installed on bionic (python <3.7)
if filepath.suffix == ".wav" and distro.codename() == "bionic":
del metadata["bit_rate"]
del found["bit_rate"]
# mp3,ogg,flac files does not support comments yet
if not filepath.suffix == ".m4a":
if "comment" in metadata:

View file

@ -1,4 +1,3 @@
import distro
import pytest
from libretime_analyzer.pipeline.analyze_replaygain import analyze_replaygain
@ -13,10 +12,5 @@ from ..fixtures import FILES
def test_analyze_replaygain(filepath, replaygain):
tolerance = 0.8
# On bionic, replaygain is a bit higher for loud mp3 files.
# This huge tolerance makes the test pass, with values devianting from ~-17 to ~-13
if distro.codename() == "bionic" and str(filepath).endswith("+12.mp3"):
tolerance = 5
metadata = analyze_replaygain(filepath, {})
assert metadata["replay_gain"] == pytest.approx(replaygain, abs=tolerance)

View file

@ -1,6 +1,3 @@
from math import inf
import distro
import pytest
from libretime_analyzer.pipeline._ffmpeg import (
@ -30,11 +27,6 @@ def test_probe_replaygain(filepath, replaygain):
def test_compute_replaygain(filepath, replaygain):
tolerance = 0.8
# On bionic, replaygain is a bit higher for loud mp3 files.
# This huge tolerance makes the test pass, with values devianting from ~-17 to ~-13
if distro.codename() == "bionic" and str(filepath).endswith("+12.mp3"):
tolerance = 5
assert compute_replaygain(filepath) == pytest.approx(replaygain, abs=tolerance)
@ -86,10 +78,6 @@ def test_silence_detect_re(line, expected):
def test_compute_silences(filepath, length, cuein, cueout):
result = compute_silences(filepath)
# On bionic, large file duration is a wrong.
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
return
if cuein != 0.0:
assert len(result) > 0
first = result.pop(0)
@ -97,11 +85,6 @@ def test_compute_silences(filepath, length, cuein, cueout):
assert first[1] == pytest.approx(cuein, abs=1)
if cueout != length:
# ffmpeg v3 (bionic) does not warn about silence end when the track ends.
# Check for infinity on last silence ending
if distro.codename() == "bionic":
length = inf
assert len(result) > 0
last = result.pop()
assert last[0] == pytest.approx(cueout, abs=1)
@ -113,8 +96,4 @@ def test_compute_silences(filepath, length, cuein, cueout):
map(lambda i: pytest.param(i.path, i.length, id=i.path.name), FILES),
)
def test_probe_duration(filepath, length):
# On bionic, large file duration is a wrong.
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
return
assert probe_duration(filepath) == pytest.approx(length, abs=0.05)