mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Move art.py to beetsplug._utils package to avoid polluting core namespace (#6013)
This PR moves the `art.py` module, which is only used by the plugin architecture, to avoid polluting the main beets namespace.
This commit is contained in:
commit
dc4e4e5020
7 changed files with 13 additions and 5 deletions
|
|
@ -70,4 +70,6 @@ d93ddf8dd43e4f9ed072a03829e287c78d2570a2
|
|||
# Moved dev docs
|
||||
07549ed896d9649562d40b75cd30702e6fa6e975
|
||||
# Moved plugin docs Further Reading chapter
|
||||
33f1a5d0bef8ca08be79ee7a0d02a018d502680d
|
||||
33f1a5d0bef8ca08be79ee7a0d02a018d502680d
|
||||
# Moved art.py utility module from beets into beetsplug
|
||||
28aee0fde463f1e18dfdba1994e2bdb80833722f
|
||||
0
beetsplug/_utils/__init__.py
Normal file
0
beetsplug/_utils/__init__.py
Normal file
|
|
@ -25,12 +25,13 @@ from string import Template
|
|||
import mediafile
|
||||
from confuse import ConfigTypeError, Optional
|
||||
|
||||
from beets import art, config, plugins, ui, util
|
||||
from beets import config, plugins, ui, util
|
||||
from beets.library import Item, parse_query_string
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets.util import par_map
|
||||
from beets.util.artresizer import ArtResizer
|
||||
from beets.util.m3u import M3UFile
|
||||
from beetsplug._utils import art
|
||||
|
||||
_fs_lock = threading.Lock()
|
||||
_temp_files = [] # Keep track of temporary transcoded files for deletion.
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ from mimetypes import guess_extension
|
|||
|
||||
import requests
|
||||
|
||||
from beets import art, config, ui
|
||||
from beets import config, ui
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets.ui import print_
|
||||
from beets.util import bytestring_path, displayable_path, normpath, syspath
|
||||
from beets.util.artresizer import ArtResizer
|
||||
from beetsplug._utils import art
|
||||
|
||||
|
||||
def _confirm(objs, album):
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ Other changes:
|
|||
match :bug:`6020`
|
||||
- :doc:`guides/tagger`: Section on no matching release found, related to
|
||||
possibly disabled musicbrainz plugin :bug:`6020`
|
||||
- Moved ``art.py`` utility module from ``beets`` into ``beetsplug`` namespace as
|
||||
it is not used in the core beets codebase. It can now be found in
|
||||
``beetsplug._utils``.
|
||||
|
||||
2.4.0 (September 13, 2025)
|
||||
--------------------------
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from unittest.mock import MagicMock, patch
|
|||
import pytest
|
||||
from mediafile import MediaFile
|
||||
|
||||
from beets import art, config, logging, ui
|
||||
from beets import config, logging, ui
|
||||
from beets.test import _common
|
||||
from beets.test.helper import (
|
||||
BeetsTestCase,
|
||||
|
|
@ -33,6 +33,7 @@ from beets.test.helper import (
|
|||
)
|
||||
from beets.util import bytestring_path, displayable_path, syspath
|
||||
from beets.util.artresizer import ArtResizer
|
||||
from beetsplug._utils import art
|
||||
from test.test_art_resize import DummyIMBackend
|
||||
|
||||
|
||||
|
|
@ -283,7 +284,7 @@ class DummyArtResizer(ArtResizer):
|
|||
|
||||
|
||||
@patch("beets.util.artresizer.subprocess")
|
||||
@patch("beets.art.extract")
|
||||
@patch("beetsplug._utils.art.extract")
|
||||
class ArtSimilarityTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.item = _common.item()
|
||||
|
|
|
|||
Loading…
Reference in a new issue