Skip to content

v0.7.0

Pre-release
Pre-release

Choose a tag to compare

@svioletg svioletg released this 25 May 21:55
· 237 commits to main since this release

v0.6.1...v0.7.0

Overview

Breaking changes:

  • TOML configuration keys now use underscores (_) instead of hyphens (-)
  • Config key log_level under logging is now level

  • [feature] A duration limit for media items can now be set using the max-duration config key, which
    specifies the limit in seconds using a positive integer (setting to 0 will disable the limit)
    • max-duration-allow-unknown specifies whether tracks with an unknown duration can be played
      or not when a duration limit is in place, defaulting to false
      • If no limit is set, this key is unused and tracks of unknown duration are always allowed
      • To save time on queueing, Lydian does not fetch a track's duration until it needs to, meaning
        items queued from a playlist URL won't have their duration checked against the limit until
        they are next in line
  • [feature] lydian can now be run with the -V or --version option to display the installed Lydian
    version and exit without starting the bot
  • [feature] The "now playing" view now shows the approximate current timestamp of the playing media
    (#13)
    • Slight network delays will likely cause this number to be slightly inaccurate, but it should
      remain close enough for reference
  • [fix] Fixed filesize strings in the config with single digits raising an error due to a typo in the
    regex used to match them

Added

  • Added the -V/--version option to the lydian package command
    • When used, Lydian's version is printed out and the script immediately exits
  • Added config key max-duration (integer)
  • Added config key max-duration-allow-unknown (boolean)
  • Added class config.Config.ConfigField
  • Added class config.Config.ConfigFieldMeta
  • Added method config.Config.set()
  • Added property config.Config.fields
  • Added function util.compose()
  • Added support for validator functions in config.Config fields, which can be given with the
    'validators' key of a given field's metadata argument as a single function or iterable of
    functions

Changed

  • Having debug mode enabled no longer forces the log level to "DEBUG" level
  • cogs.voice.MediaItem.duration_str now returns ?:?? for an unknown duration instead of None
  • cogs.voice.MediaItem.embed() now accepts an optional timestamp keyword argument to show the
    current time alongside its duration
  • TOML configuration keys are now in snake_case instead of kebab-case; though the latter is more
    common in TOML, it's ultimately unnecessary to keep converting keys between the two cases where
    needed
  • const.LogLevel is now an IntEnum subclass instead of StrEnum
  • config.Config updating and loading from TOML is now handled in the class itself in a simpler
    fashion than using util.DataclassUpdateMixin (#26)

Removed

  • Removed mixin class util.DataclassUpdateMixin
    • Only used for updating the configuration object, which now handles updating in its own class

Fixed

  • Fixed single-digit filesize numbers in TOML config not matching pattern
  • Queue no longer stops when encountering an error, will now skip problematic items until one can be
    played or the queue is empty (#25)