Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Improve accuracy of matching album in directory structure for local filesystem #1779

Merged
merged 3 commits into from
Nov 20, 2024

Commits on Nov 17, 2024

  1. Improve accuracy of matching album to dirname

    This code resolves a problem with some of the albums not being matched
    by other heuristics in the get_album_dir() method by taking slightly
    different approach. It emulates what humans do - mentally break down the
    name into logical chunks that represent an artist name, album name and
    ignoring everything else.
    
    The testing suite has been extended with a few examples of albums
    exhibiting problems with the way matching was done prior to this commit.
    skrobul committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    bae9b56 View commit details
    Browse the repository at this point in the history
  2. Fix: unsupported operand type(s) for 'in': 'str' and 'EnumType'

    Fixes:
    
    2024-11-17 10:48:20.315 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
    Traceback (most recent call last):
      File "/home/skrobul/devel/music-assistant-server/music_assistant/providers/filesystem_local/__init__.py", line 1014, in _parse_album
        if images := await self._get_local_images(folder_path):
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/skrobul/devel/music-assistant-server/music_assistant/providers/filesystem_local/__init__.py", line 1032, in _get_local_images
        if item.name in ImageType:
           ^^^^^^^^^^^^^^^^^^^^^^
      File "/run/current-system/sw/lib/python3.11/enum.py", line 742, in __contains__
        raise TypeError(
    TypeError: unsupported operand type(s) for 'in': 'str' and 'EnumType'
    skrobul committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    0bf461c View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. Configuration menu
    Copy the full SHA
    55b3c78 View commit details
    Browse the repository at this point in the history