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

Local cache of artists' images? #417

Closed
alessandrococco opened this issue Jul 5, 2024 · 8 comments
Closed

Local cache of artists' images? #417

alessandrococco opened this issue Jul 5, 2024 · 8 comments

Comments

@alessandrococco
Copy link
Contributor

Hello,

The artists view shows the artists' image:

image

But the artist's page doesn't:

image

Could the artist image be cached locally so it would be shown in the artist page?

@dweymouth
Copy link
Owner

It uses a different image source for the grid view and the profile pic on the artist page. On the artist page, it uses the largeImageURL from the getArtistInfo2 API - https://opensubsonic.netlify.app/docs/endpoints/getartistinfo2/ - in the gridview it uses the coverArtId property that is returned in getArtists. Both images are cached, and on most servers they are the same. I thought I added a fallback to coverArtId if the largeImageURL isn't present, but maybe I forgot to

@dweymouth
Copy link
Owner

@alessandrococco you use LMS, right? I think this could be resolved after the fix for epoupon/lms#435 in the latest LMS

@alessandrococco
Copy link
Contributor Author

@alessandrococco you use LMS, right? I think this could be resolved after the fix for epoupon/lms#435 in the latest LMS

Thanks, I didn't noticed that issue ;-)

@dweymouth dweymouth closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
@alessandrococco
Copy link
Contributor Author

alessandrococco commented Jul 24, 2024

@alessandrococco you use LMS, right? I think this could be resolved after the fix for epoupon/lms#435 in the latest LMS

Hello, some days ago I updated to latest lms and launched a full scan but still I cannot see the artist image in the artist view 😢

I noticed a weird thing:

I tried to call the getArtistInfo2 that appears in the lms logs after a click on an artist: it seems that the image is not present in the response.

image

image

It seems to be a bug on lms side.

@alessandrococco
Copy link
Contributor Author

I just retrieve one of my old issue: epoupon/lms#392 (comment)

It seems that the correct endpoint to retrieve the artist image from lms is getCoverArt. Could it be used as fallback in supersonic?

@dweymouth dweymouth reopened this Jul 25, 2024
@dweymouth
Copy link
Owner

@alessandrococco I checked the code and it seems that Supersonic is using the coverArtId property for artists as the primary image source for the artist page, and the largeImageURL as a fallback. Does LMS return a coverArtId property for the getArtist endpoint? Also does Supersonic log out any errors related to image fetching when you load an artist page?

@alessandrococco
Copy link
Contributor Author

@dweymouth The getArtist response contains a coverArt but not a coverArtId:

<?xml version="1.0" encoding="utf-8"?>
<subsonic-response openSubsonic="true" serverVersion="6" status="ok" type="lms" version="1.16.0">
    <artist albumCount="1" coverArt="ar-45" id="ar-45" musicBrainzId="eda0c0a6-c3ce-426d-8f84-e3200bc02693" name="1914" sortName="1914">
        <album artist="1914" artistId="ar-45" coverArt="al-486" created="2021-06-30T22:33:38.000" displayArtist="1914" duration="3582" genre="Blackened death metal" id="al-486" isCompilation="false" musicBrainzId="dbcb2b6b-8195-4f2a-8a9e-afcca9259abb" name="The Blind Leading the Blind" playCount="0" played="" songCount="11" sortName="Blind Leading the Blind, The" year="2018">
            <originalReleaseDate/>
            <artists id="ar-45" name="1914"/>
            <genres name="Blackened death metal"/>
            <releaseTypes>album</releaseTypes>
        </album>
        <roles>artist</roles>
        <roles>albumartist</roles>
    </artist>
</subsonic-response>

If I call the getCoverArt with the value of coverArt I correctly get the artist photo.

Also does Supersonic log out any errors related to image fetching when you load an artist page?

There are no errors in the LMS logs and Supersonic does not display any error; where's the Supersonic log file?

@dweymouth
Copy link
Owner

I misspoke, coverArt is the property name - I'll have to debug more on my end then as it looks like LMS is returning a correct artist response, maybe I misread the code when I thought it was using coverArt preferentially to largeImageURL.

There is no Supersonic log file, but if you start it from the terminal it will print error messages

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

No branches or pull requests

2 participants