Files
swingmusic-extended/src/swingmusic/lib/pydub/CHANGELOG.md
T
michily e770606567 merge refactors pr #364 from @michilyy
* Save to DB only unique trackhashes

* Add check if track already exists in playlist

* replace all paths with `pathlib.Path`

* `architecture.md`:
* add config folder layout

`config.py`:
* fix bug where `pathlib.Path` cannot be serialized

`files.py`:
* remove unused imports
* update path concatenation to `pathlib.Path`
* add config-folder creation

`imgserver.py`:
* fix serialisation bug

`playlistlib.py`:
* update path concatenation to `pathlib.Path`

* update all `settings.Paths` usages to new singleton `Paths` class.

* update all usages of `settings.Paths`

* `files.py`:
* rework assets copy function.
* remove unused loop and unused `shutil.copy2` function

`settings.py`
* fix recursion exception in `Paths`

* `settings.py`:
* remove Singleton and `@property` todos from `Paths`

* `__init__.py`:
* remove now unused function `create_config_dir()`

`setup.files`:
* remove because merged into `settings.Paths()`
  for more central and clear flow how the base path gets decided

`settings.py`:
* add `copy_assets` function

`start_swingmusic.py`:
* add configurable settings.Paths class

`__main__.py`:
* update click to used correct default path

* remove wrong commited egg files

* remove change in the wrong branch

* add forgotten `property` decorator
update `get_files_and_dirs` to use pathlib where possible

`config.py`:
* update type annotation

`folders.py`:
* convert `pathlib` to posix path where needed for sub-functions

`folderlib.py`:
* rework `get_files_and_dirs` to use `pathlib` where possible

`settings.py`:
* add forgotten `@property`

`start_swingmusic.py`:
* remove second `log_startup_info()`

* `artistlib.py`:
* fix calling property
`tagger.py`:
* fix comparing elements in `pathlib.Path`

* add support for repeating lyrics.

* rework lyrics api and lib

* update most path functions.
add type-hint pathlib where needed

* for serialization paths are converted to posix path

* use `open` instead of `os.open`
update `metaclass` with constant

* fix initial config exception if empty file existed

* update `userConfig` with `InitVar` to be excluded from `asdict`

* remove `is_windows_slash()`
rework path function to use pathlib

* convert `pathlib.Path` to `str` for serialization

* fixing bug with str + pathlib

* `__main__.py`:
* update click to use package version
* remove now unused function `print_version`

`filesystem.py`:
* rework `CWD` to use importlib

`pyproject.toml`:
* disable namespace for `importlib.resources` to work correctly

* update `lyrics.py`:
* remove unused functions
* simplify functions

* fix bug where assets get created on root

* remove unused code

* update lyrics for clearer structure.

* add support for unsynced lyrics

* fix wrong return type in unsynced lyrics

* update `/check` to use `send_lyrics`

* prefer tags to duplicates

* `lyrics.py`:
* add docs to a function group

* `logger.py`:
* add logging config dict.
* combine Logging into one file
* add socket logger
* add debug mode to logger
* add JSONL formater

* `logger.py`:
* update config to directly use the formater.
resolves circular import exception

`__main__.py`:
* add logger setup to main

`start_swingmusic.py`:
* add debug option to cli

* `lyrics.py`:
* add offset support

* add `setuptools-scm` to get version from git

* add support for docker build with scm

* add support for docker build with scm
need someone who can test the changes workflow

* update all usage of `version.txt` to `metadata.version()`

* 2x update all usage of `version.txt` to `metadata.version()`

* update to no local_scheme version

* provide fix for #331.
convert `sql.Row` and `TrackTable` to dict before converting to dataclass.

* fix `__main__.py`:
* wrong import and uncommited changes
* add debug and base_path parameter

* fix logger pathlib

* add client build workflow

* set name

* split client from build

* try fixing builds

* try another fix

* try also another fix

* try again something new

* try again something new

* change runner

* fix failed run because of malformed runner

* add wheel builds

* remove systems from pure python build

* add isolated pyinstaller build

* artifacts with names

* wrong wheel path

* try fetch-depth for tag fetch

* disable fail-fast.
add wheel installation

* add install system packages

* add debug

* fix wheel install
fix pyinstaller spec file

* try fix for pyinstaller

* try another fix

* build on release

* add concrete release types

* only run on released or pre-released

* try release upload

* reformat upload

* fix needs tag

* identifiable pyinstaller builds

* compress client folder before uploading

* update to src build

* remove no more needed aarch64 build script
rename pyinstaller assets to lowercase

* remove unneeded code

* fix: save to DB only unique track hashes

* replace click with argparse

* set concrete types in argparse

* replace manuall path usages with pathlib

* remove unused `configs.py` file

* reformat `start_swingmusic.py`

* fix empty set startup exception

* optimizing static files serve function

* fixing bug in optimisation of static files serve function

* fix folder view bug

* colorlib.py:
* fix wrong type exception
* remove singe use Index_everything class
* update logging of populate.py

* cleanup files

* fix settings.py Paths copy function.
Created folder on file.

* add exist check to folder

* remove unused `INFO` class

* fix multiprocessing bug on windows

* potential icon fix for pyinstaller
fix multiple logging bug

* fix argparse config path bug
add jobs file

* cleanup code fragments
fix logging issue
add notes to function

* note that concurrent creates own sys.modules

* refactor some lyrics plugin condition
remove unused import from hashing

* refactor taglib.py

* update import statements to be static

* playlistlib.py:
* refactoring and more doc strings
populate.py:
* add poc bugfix
settings.py:
* add typehint

* possible bugfix for multitreading globals

* folder.py:
* add check if provided path is absolute
populate.py:
* add bug note
settings.py:
* add possible error from Singleton implementation
start_swingmusic.py:
* correct spelling
* pass resolved path to Paths
tagger.py:
* add logging

* trying out fixes for multithreading

* only upload results not metadata

* fix build action again

* folder.py:
* strictly use pathlib where possible

folderlib.py:
* add missing docstring to function, who really need it.

track.py:
* refactor some code

folder.py:
* refactor some more code

* Merge DBPath class and Paths class.
Update all usages of DBPath

folderslib.py:
* fix bug with logging

taglib.py:
* add missing docstring

settings.py:
* merge classes
* refactor

* network.py:
* add more docstring

config.py:
* update pathlib usage

tools.py:
* refactor
* add docstrings

* colorlib.py:
* add docstring

Refactor App builder into grouped config settings.

* update assets access for migration

* Update FUNDING.yml

* Update FUNDING.yml

* upgrade tinytag in requirements.txt

* update readme

* update license

* update readme

* Update README.md

* Update README.md

* cleanup requirements.txt
remove unused import in audio_segment.py
add entrypoint.sh for appimage support
update pyproject.toml for optional dependencies
add appimage to github workflow

* fix invalid workflow file

* AppImage build needs more research.
Commenting for now

* testing a new build workflow

* add libev installation

* update workflow to new optional dependencies

* trying again another fix

* finally fix all optional deps installation correctly

* remove AppImage poc

* albumslib.py:
* add docstring

folder.py:
* add unix path fix

update logger name to `__name__`

* update build with docker
update Dockerfile with git
fix typo in lyrics.py
add dynamic deps back

* add log for static folder

* add missing import

* add some more todos

* add support for AppImages even when it's not perfect.

* quick bugfix for wrong appimage config path

* fix uploading not finding AppImages builds aka wrong pattern

* optimise docker build by using artifacts.
Add client path option.
change docstring to sphinx format

* add todos

* Now support AppImages for real:
manually build AppImage as we are building a complex project.

* fix missing dep in AppImage build

* add full AppImage metadata

* add missing image file.

* only update swingmusic appimage not tool

* add todo and fix AppImage build again.

* Try fixing some path mixup in AppImage build

* add debug tag to action

* correct path to appimage folder

* do not download tool before checkout

* Another fix for path in appimage build

* extend config files with more information

* default client dir is now inside the config dir.
TODOs updated.

* default client dir is now inside the config dir.
TODOs updated.
Add priority todos.

* Auto download client when client not found.
Respects user provided dir.

* rename `requests` submodule to `request`

* poc for arm AppImage builds

* try out another fix

* fix typo in build.yml

* add missing arch tag

* fix uploading double names

* unique naming

* enable fallback version for project.

* do not download client into readonly dir.

* fix relative client download path. Client was resolved into parent of config.

* remove client backup path as client is now downloadable

* `Paths` checks if config folder exists and creates it if necessary.
logger no more creates the config folder.
`app_builder.py`: static route no more with '/client'

* path are only created in MainProcess.
fix gz file not found.

* move assets into src and update usages accordingly

* remove solved todos

* Only upload artefacts if not draft/master aka only on tag

* wrong type in assets copy

* update log with correct priority

* add debug statements and logging to Paths

* remove debugging statement

* remove double version tag from docker build

* fork save release protection

* fix typo

* add fallback client dir for static builds.

* update argparse to new param

* add missing import pathlib

* add sparse checkout as we do not need everything downloaded

* add assets copy check

* init logger bevor Paths

* remove unused import

* check if logdir exists and create if not

* only add exec info to file

* remove exception log from cli

* move logging into main.
Allows tools support again.

* UserConfig now correctly uses _finished key.
Bug where _finished was never written

* double save serverId.
update root_dir to trow no exception on init.
remove debug param

* clean up TODOs

---------

Co-authored-by: skilletfun <skilletfun.laptew.sergey@yandex.ru>
Co-authored-by: Mungai Njoroge <geoffreymungai45@gmail.com>
2025-08-28 12:28:11 +03:00

10 KiB

v0.25.1

  • Fix crashing bug in new scipy-powered EQ effects

v0.25.0

  • Don't show a runtime warning about the optional ffplay dependency being missing until someone trys to use it
  • Documentation improvements
  • Python 3.9 support
  • Improved efficiency of loading wave files with pydub.AudioSegment.from_file()
  • Ensure pydub.AudioSegment().export() always retuns files with a seek position at the beginning of the file
  • Added more EQ effects to pydub.scipy_effects (requires scipy to be installed)
  • Fix a packaging bug where the LICENSE file was not included in the source distribution
  • Add a way to instantiate a pydub.AudioSegment() with a portion of an audio file via pydub.AudioSegment().from_file()

v0.24.1

  • Fix bug where ffmpeg errors in Python 3 are illegible
  • Fix bug where split_on_silence fails when there are one or fewer nonsilent segments
  • Fix bug in fallback audioop implementation

v0.24.0

  • Fix inconsistent handling of 8-bit audio
  • Fix bug where certain files will fail to parse
  • Fix bug where pyaudio stream is not closed on error
  • Allow codecs and parameters in wav and raw export
  • Fix bug in pydub.AudioSegment.from_file where supplied codec is ignored
  • Allow pydub.silence.split_on_silence to take a boolean for keep_silence
  • Fix bug where pydub.silence.split_on_silence sometimes adds non-silence from adjacent segments
  • Fix bug where pydub.AudioSegment.extract_wav_headers fails on empty wav files
  • Add new function pydub.silence.detect_leading_silence
  • Support conversion between an arbitrary number of channels and mono in pydub.AudioSegment.set_channels
  • Fix several issues related to reading from filelike objects

v0.23.1

  • Fix bug in passing ffmpeg/avconv parameters for pydub.AudioSegment.from_mp3(), pydub.AudioSegment.from_flv(), pydub.AudioSegment.from_ogg(), and pydub.AudioSegment.from_wav()
  • Fix logic bug in pydub.effects.strip_silence()

v0.23.0

  • Add support for playback via simpleaudio
  • Allow users to override the type in pydub.AudioSegment().get_array_of_samples() (PR #313)
  • Fix a bug where the wrong codec was used for 8-bit audio (PR #309 - issue #308)

v0.22.1

  • Fix pydub.utils.mediainfo_json() to work with newer, backwards-incompatible versions of ffprobe/avprobe

v0.22.0

  • Adds support for audio with frame rates (sample rates) of 48k and higher (requires scipy) (PR #262, fixes #134, #237, #209)
  • Adds support for PEP 519 File Path protocol (PR #252)
  • Fixes a few places where handles to temporary files are kept open (PR #280)
  • Add the license file to the python package to aid other packaging projects (PR #279, fixes #274)
  • Big fix for pydub.silence.detect_silence() (PR #263)

v0.21.0

  • NOTE: Semi-counterintuitive change: using the a stride when slicing AudioSegment instances (for example, sound[::5000]) will return chunks of 5000ms (not 1ms chunks every 5000ms) (#222)
  • Debug output from ffmpeg/avlib is no longer printed to the console unless you set up logging (see README for how to set up logging for your converter) (#223)
  • All pydub exceptions are now subclasses of pydub.exceptions.PydubException (PR #244)
  • The utilities in pydub.silence now accept a seek_stepargument which can optionally be passed to improve the performance of silence detection (#211)
  • Fix to pydub.silence utilities which allow you to detect perfect silence (#233)
  • Fix a bug where threaded code screws up your terminal session due to ffmpeg inheriting the stdin from the parent process. (#231)
  • Fix a bug where a crashing programs using pydub would leave behind their temporary files (#206)

v0.20.0

  • Add new parameter gain_during_overlay to pydub.AudioSegment.overlay which allows users to adjust the volume of the target AudioSegment during the portion of the segment which is overlaid with the additional AudioSegment.
  • pydub.playback.play() No longer displays the (very verbose) playback "banner" when using ffplay
  • Fix a confusing error message when using invalid crossfade durations (issue #193)

v0.19.0

  • Allow codec and ffmpeg/avconv parameters to be set in the pydub.AudioSegment.from_file() for more control while decoding audio files
  • Allow AudioSegment objects with more than two channels to be split using pydub.AudioSegment().split_to_mono()
  • Add support for inverting the phase of only one channel in a multi-channel pydub.AudioSegment object
  • Fix a bug with the latest avprobe that broke pydub.utils.mediainfo()
  • Add tests for webm encoding/decoding

v0.18.0

  • Add a new constructor: pydub.AudioSegment.from_mono_audiosegments() which allows users to create a multi-channel audiosegment out of multiple mono ones.
  • Refactor pydub.AudioSegment._sync() to support an arbitrary number of audiosegment arguments.

v0.17.0

  • Add the ability to add a cover image to MP3 exports via the cover keyword argument to pydub.AudioSegment().export()
  • Add pydub.AudioSegment().get_dc_offset() and pydub.AudioSegment().remove_dc_offset() which allow detection and removal of DC offset in audio files.
  • Minor fixes for windows users

v0.16.7

  • Make pydub.AudioSegment()._spawn() accept array.array instances containing audio samples

v0.16.6

  • Make pydub.AudioSegment() objects playable inline in ipython notebooks.
  • Add scipy powered high pass, low pass, and band pass filters, which can be high order filters (they take order as a keyword argument). They are used for pydub.AudioSegment().high_pass_filter(), pydub.AudioSegment().low_pass_filter(), pydub.AudioSegment().band_pass_filter() when the pydub.scipy_effects module is imported.
  • Fix minor bug in pydub.silence.detect_silence()

v0.16.5

  • Update pydub.AudioSegment()._spawn() method to allow user subclassing of pydub.AudioSegment
  • Add a workaround for incorrect duration reporting of some mp3 files on macOS

v0.16.4

  • Add support for radd (basically, allow sum() to operate on an iterable of pydub.AudioSegment() objects)
  • Fix bug in 24-bit wav support (understatement. It didn't work right at all the first time)

v0.16.3

  • Add support for python 3.5 (overstatement. We just added python 3.5 to CI and it worked 😄)
  • Add native support for 24-bit wav files (ffmpeg/avconv not required)

v0.16.2

  • Fix bug where you couldn't directly instantiate pydub.AudioSegment with bytes data in python 3

v0.16.1

  • pydub will use any ffmpeg/avconv binary that's in the current directory (as reported by os.getcwd()) before searching for a system install

v0.16.0

  • Make it easier to instantiate pydub.AudioSegment() directly when creating audio segments from raw audio data (without having to write it to a file first)
  • Add pydub.AudioSegment().get_array_of_samples() method which returns the samples which make up an audio segment (you should usually prefer this over pydub.AudioSegment().raw_data)
  • Add pydub.AudioSegment().raw_data property which returns the raw audio data for an audio segment as a bytes (python 3) or a bytestring (python 3)
  • Allow users to specify frame rate in pydub.AudioSegment.silent() constructor

v0.15.0

  • Add support for RAW audio (basically WAV format, but without wave headers)
  • Add a new exception pydub.exceptions.CouldntDecodeError to indicate a failure of ffmpeg/avconv to decode a file (as indicated by ffmpeg/avconv exit code)

v0.14.2

  • Fix a bug in python 3.4 which failed to read wave files with no audio data (should have been audio segments with a duration of 0 ms)

v0.14.1

  • Fix a bug in pydub.utils.mediainfo() that caused inputs containing unescaped characters to raise a runtime error (inputs are not supposed to require escaping)

v0.14.0

  • Rename pydub.AudioSegment().set_gain() to pydub.AudioSegment().apply_gain_stereo() to better reflect it's place in the world (as a counterpart to pydub.AudioSegment().apply_gain())

v0.13.0

  • Add pydub.AudioSegment().pan() which returns a new stereo audio segment panned left/right as specified.

v0.12.0

  • Add a logger, "pydub.converter" which logs the ffmpeg commands being run by pydub.
  • Add pydub.AudioSegment().split_to_mono() method which returns a list of mono audio segments. One for each channel in the original audio segment.
  • Fix a bug in pydub.silence.detect_silence() which caused the function to break when a silent audio segment was equal in length to the minimum silence length. It should report a single span of silence covering the whole silent audio segment. Now it does.
  • Fix a bug where uncommon wav formats (those not supported by the stdlib wave module) would throw an exception rather than converting to a more common format via ffmpeg/avconv

v0.11.0

  • Add pydub.AudioSegment().max_dBFS which reports the loudness (in dBFS) of the loudest point (i.e., highest amplitude sample) of an audio segment

v0.10.0

  • Overhaul Documentation
  • Improve performance of pydub.AudioSegment().overlay()
  • Add pydub.AudioSegment().invert_phase() which (shocker) inverts the phase of an audio segment
  • Fix a type error in pydub.AudioSegment.get_sample_slice()

v0.9.5

  • Add pydub.generators module containing simple signal generation functions (white noise, sine, square wave, etc)
  • Add a loops keyword argument to pydub.AudioSegment().overlay() which allows users to specify that the overlaid audio should be repeated (i.e., looped) a certain number of times, or indefinitely

0.9.4

  • Fix a bug in db_to_float() where all values were off by a factor of 2

0.9.3

  • Allow users to set the location of their converter by setting pydub.AudioSegment.converter = "/path/to/ffmpeg" and added a shim to support the old method of assigning to pydub.AudioSegment.ffmpeg (which is deprecated now that we support avconv)

v0.9.2

  • Add support for Python 3.4
  • Audio files opened with format "wave" are treated as "wav" and "m4a" are treated as "mp4"
  • Add pydub.silence module with simple utilities for detecting and removing silence.
  • Fix a bug affecting auto-detection of ffmpeg/avconv on windows.
  • Fix a bug that caused pydub to only work when ffmpeg/avconv is present (it should be able to work with WAV data without any dependencies)

v0.9.1

  • Add a runtime warning when ffmpeg/avconv cannot be found to aid debugging

v0.9.0

  • Added support for pypy (by reimplementing audioop in python). Also, we contributed our implementation to the pypy project, so that's 💯
  • Add support for avconv as an alternative to ffmpeg
  • Add a new helper module pydub.playback which allows you to quickly listen to an audio segment using ffplay (or avplay)
  • Add new function pydub.utils.mediainfo('/path/to/audio/file.ext') which reports back the results of ffprobe (or avprobe) including codec, bitrate, channels, etc