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

Airsonic integration does not sync album art #1225

Open
AntonLydike opened this issue Sep 3, 2024 · 8 comments
Open

Airsonic integration does not sync album art #1225

AntonLydike opened this issue Sep 3, 2024 · 8 comments

Comments

@AntonLydike
Copy link

AntonLydike commented Sep 3, 2024

When integrating with the NextCloud Music Subsonic API, artist art is synced, but album art is not synced and/or broken (see below).

I haven't tested Tauon yet with other subsonic endpoints, but I tested other clients with the same endpoint and they are able to download album art.

I'm happy to contribute a fix here if this is indeed a bug.

Tauon version: v7.7.2
Nextcloud Music version: 2.0.0

image

@Taiko2k
Copy link
Owner

Taiko2k commented Sep 3, 2024

You could investigate if you're able to get Tauon running from source.

To diagnose, try run Tauon from terminal, you should see an error about image generation. Open t_modules/t_main.py, and search for that string in the source file, then place a raise statement in that except block and run again to get a full trackback.

@AntonLydike
Copy link
Author

Thanks for the pointers! I am currently super duper swamped with work, but I'll put in a calendar reminder on the 17th to look into this!

@AntonLydike
Copy link
Author

AntonLydike commented Sep 3, 2024

Okay, did a tiny bit of digging, and I see a bunch of errors:

Blur blackground error
cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>
Exception in thread Thread-14 (worker4):
Traceback (most recent call last):
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 25285, in worker4
    style_overlay.worker()
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 13058, in worker
    self.im = album_art_gen.get_blur_im(track)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 12502, in get_blur_im
    im = Image.open(source_image)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/015hrwjaajqi52175zj2cs3g56jgwxl8-python3.11-pillow-10.3.0/lib/python3.11/site-packages/PIL/Image.py", line 3339, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>
Blur blackground error
cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>
Exception in thread Thread-15 (worker4):
Traceback (most recent call last):
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
Applying theme: Sky
    self.run()
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 25285, in worker4
    style_overlay.worker()
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 13058, in worker
    self.im = album_art_gen.get_blur_im(track)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 12502, in get_blur_im
    im = Image.open(source_image)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/015hrwjaajqi52175zj2cs3g56jgwxl8-python3.11-pillow-10.3.0/lib/python3.11/site-packages/PIL/Image.py", line 3339, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>
Reloading smart playlist: Music
Blur blackground error
cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>
Exception in thread Thread-16 (worker4):
Traceback (most recent call last):
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 25285, in worker4
    style_overlay.worker()
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 13058, in worker
    self.im = album_art_gen.get_blur_im(track)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/5yvdl6bmwlpwc7j2q6kzd0h3j386av55-tauon-7.7.2/share/tauon/t_modules/t_main.py", line 12502, in get_blur_im
    im = Image.open(source_image)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/015hrwjaajqi52175zj2cs3g56jgwxl8-python3.11-pillow-10.3.0/lib/python3.11/site-packages/PIL/Image.py", line 3339, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3'>

And investigating that file, I see:

>file /home/anton/.cache/TauonMusicBox/network/0598a68f9ea3
/home/anton/.cache/TauonMusicBox/network/0598a68f9ea3: JSON text data
>cat /home/anton/.cache/TauonMusicBox/network/0598a68f9ea3 | jq
{
  "subsonic-response": {
    "error": {
      "code": 70,
      "message": "entity track-624 has no cover"
    },
    "status": "failed",
    "version": "1.16.1",
    "type": "nextcloud music",
    "serverVersion": "2.0.0",
    "openSubsonic": true
  }
}

I think this is the Tauon "wallpaper" background, but it would hint at a problem in the API instead of in Tauon...

@C0rn3j
Copy link
Collaborator

C0rn3j commented Nov 28, 2024

That's at least partially on Tauon, we shouldn't be passing a JSON reply with an error as an image :)

I'd suggest testing on the devel branch in this PR (or just master if it's pulled already) - #1311

There is a check here for API errors, but the API response is currently passed back anyway, even if it logs an error:

		if d["subsonic-response"]["status"] != "ok":
			logging.error("Subsonic Error: " + response.text)

We should probably be handling the case better.

Does this actually get logged when the issue happens?

If so, it's probably the cause of the errors you posted above.

@AntonLydike
Copy link
Author

Hi, sorry for not getting back to this earlier. I realized that it's harder than expected to get Tauon runnin in dev mode on my machine, will attempt another run hopefully soon!

Thanks for sticking with this issue!

@C0rn3j
Copy link
Collaborator

C0rn3j commented Nov 29, 2024

If you're on Linux, the new run.sh script should work fine for it - albeit it does not run Tauon in the devel mode, it sets up a dev venv though.

@C0rn3j C0rn3j added the unconfirmed bug Are you getting this bug too? label Dec 29, 2024
@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

image

This is either fixed or very likely specific to Nextcloud Music.

Test the latest development prebuilt before trying your own dev env and see if it doesn't work there.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Jan 22, 2025

#1163 that I just closed in favor of this one also mentioned missing lyrics from NC Music.

@AntonLydike as for getting the dev version up, you might want to read up in #1082 as the fellow there also runs Nix and they got it to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants