beets icon indicating copy to clipboard operation
beets copied to clipboard

`beet convert --format <format>` does not override `convert: never_convert_lossy_files: yes` (it should)

Open zacharyburnett opened this issue 1 year ago • 3 comments

Problem

if never_convert_lossy_files is set:

convert:
  never_convert_lossy_files: yes

then even if I run, for instance:

beet convert format:mp3 --format opus

the MP3 files will not be converted to OPUS, even though I specifically requested that they be converted.

Please consider allowing command line options to override the never_convert_lossy_files setting.

Setup

  • OS: linux
  • Python version: 3.13.1
  • beets version: 2.1.0
  • Turning off plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

directory: ~/Music/Music/
plugins: convert fish duplicates badfiles edit chroma fetchart replaygain unimported

import:
  reflink: auto

chroma:
    auto: no

replaygain:
  auto: no
  backend: ffmpeg

clutter:
  - "*.jpg"
  - "*.nfo"
  - "*.png"
  - "*.lrc"

convert:
  auto: yes
  format: flac
  never_convert_lossy_files: yes

zacharyburnett avatar Feb 09 '25 15:02 zacharyburnett

I encountered a similar need; perhaps a parameter/flag such as --force or -F could be the best approach to make the command's intention explicit.

Example: beet convert -Fk title:'my track' -> It would convert and replace "my track" into my favorite format, configured in config.yaml.

-F should override checks like no_convert, never_convert_lossy_files, same format, and max_bitrate

Would that be a good approach?

gaafiz avatar Apr 07 '25 02:04 gaafiz

that sounds like a comprehensive and ergonomic approach

zacharyburnett avatar Apr 07 '25 13:04 zacharyburnett

I've created an idea discussion with some improvements (including a force option): https://github.com/beetbox/beets/discussions/5712

Depending on how it goes, I may try to implement the change myself in the coming weeks. However, Python is not a language I'm super familiar with, so it will not probably be a nice and clean fix :)

gaafiz avatar Apr 13 '25 11:04 gaafiz