Skip to content

Commit

Permalink
fx: exclude fields typo (#69)
Browse files Browse the repository at this point in the history
Due to a typo the config for fields to exclude was ignored.

---------

Co-authored-by: auto <auto>
Co-authored-by: Šarūnas Nejus <[email protected]>
  • Loading branch information
whatphilipcodes and snejus authored Oct 1, 2024
1 parent 64d372a commit 20efda7
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
- CI: Use `poetry` in the build workflow.
- CI: Use `pull_request_target` trigger to make sure secrets are passed to runs in forks.

### Fixed

- `exclude_extra_fields`: A typo that prevented exclude configurations from being applied correctly

## [0.19.2] 2024-08-04

### Fixed
Expand Down Expand Up @@ -47,18 +51,21 @@
### Updated

- `album`:

- handle some edge cases when string **EP** or **LP** is followed with data relevant to
the album
- do not remove artist or label when it is preceded by **` x `** or followed by characters
- do not remove artist or label when it is preceded by **`x`** or followed by characters
**`'`**, **`_`** and **`&`**, or words **EP**, **LP** and **deluxe**
- handle apostrophes more reliably
- Do not remove **VA** or **V/A** from the beginning when followed by a word or a number

- `album` / `title`:

- Remove **`Various -`** from album and track names
- Handle this [album sent to us by the devil himself]

- `catalognum`:

- allow catalogue numbers like **Dystopian LP01**
- parse a _range_ of catalogue numbers when it is present, for example
**TFT013SR - TFT-016SR**
Expand Down
2 changes: 1 addition & 1 deletion beetsplug/bandcamp/metaguru.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def from_html(cls, html: str, config: Optional[JSONDict] = None) -> "Metaguru":

@cached_property
def excluded_fields(self) -> Set[str]:
return set(self.config.get("excluded_fields") or [])
return set(self.config.get("exclude_extra_fields") or [])

@property
def comments(self) -> Optional[str]:
Expand Down
101 changes: 100 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Changelog = "https://github.com/snejus/beetcamp/blob/master/CHANGELOG.md"
[tool.poetry.dependencies]
python = ">=3.8, <4"

beets = { version = ">=1.5,<=1.6", extras = ["fetchart"] }
pycountry = ">=20.7.3"
beets = ">=1.4,<=2"
httpx = ">=0.27.0"
ordered-set = ">=4.0"
packaging = ">=24.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def console():

@pytest.fixture
def beets_config():
return deepcopy({**DEFAULT_CONFIG, "exclude_extra_fields": ["comments"]})
return deepcopy(DEFAULT_CONFIG)


@pytest.fixture
Expand Down

0 comments on commit 20efda7

Please sign in to comment.