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: album directory parsing with album versions #1683

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

skrobul
Copy link
Contributor

@skrobul skrobul commented Sep 29, 2024

I have found this problem while investigating why some of the covers don't load for me in https://github.com/orgs/music-assistant/discussions/2976.

This fixes how the album directory is parsed when the directory name includes the version.

Prior to this patch:

>>> print(get_album_dir(track_dir='/media/download/others/Kiasmos - II - (WEB)', album_name="II"))
None

After the patch:

>>> print(get_album_dir(track_dir='/media/download/others/Kiasmos - II - (WEB)', album_name="II"))
/media/download/others/Kiasmos - II - (WEB)

This fixes how the album directory is parsed when the directory name
includes the version.

Prior to this patch:

```
>>> print(get_album_dir(track_dir='/media/download/others/Kiasmos - II - (WEB)', album_name="II"))
None
```

After the patch:

```
>>> print(get_album_dir(track_dir='/media/download/others/Kiasmos - II - (WEB)', album_name="II"))
/media/download/others/Kiasmos - II - (WEB)
```
@skrobul skrobul requested a review from marcelveldt September 30, 2024 09:48
Copy link
Member

@marcelveldt marcelveldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@marcelveldt marcelveldt merged commit ec554ec into music-assistant:main Sep 30, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants