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

Adding Artist Images #1164

Closed
neilarmstrongest opened this issue Aug 14, 2024 · 7 comments
Closed

Adding Artist Images #1164

neilarmstrongest opened this issue Aug 14, 2024 · 7 comments
Labels

Comments

@neilarmstrongest
Copy link

Steps to reproduce

  1. Hovering the cursor on artist image says - Upload an image with "Title of Artist.*" to your library to show artist image here
  2. Uploaded an image following the same convention. Uploaded image to the same folder where the artist albums are
  3. Artist image does not show up
    Example - for Bon Jovi - I upload two images, one with "Bon Jovi.*" and the other "Bon Jovi.jpg". Neither works unfortunately

Expected behaviour
Artist image to be pulled from the directory
Screenshot 2024-08-14 185056

Art
Tell us what should happen - Artist image to be pulled from the directory

Actual behaviour - Artist image does not show up.
Tell us what happens instead

Server configuration
Operating system: Truenas Scale 24.0.2 Dragonfish

Web server: APACHE II

Database: Postgresql 13.1

PHP version: 8.2.22

ownCloud version: (see ownCloud admin page) - Nextcloud version 29.0.4

@neilarmstrongest
Copy link
Author

I ran a occ music scan command and images are indeed showing up!

Although I'm not sure which file is being picked among the 2.

@neilarmstrongest
Copy link
Author

Silly me - thought the * at the end was as is but it is just indicating the extension of the image - .jpg .png etc.

Problem solved!

@paulijar
Copy link
Collaborator

Yeah, any image file format known by Nextcloud will do and the * in the tooltip is just a placeholder for the actual extension. But didn't you say that you also uploaded "Bon Jovi.jpg" but it didn't show up before the occ music scan? That's unexpected since the Music app is supposed to notice the new image file the moment it is uploaded.

@paulijar paulijar added the Bug label Aug 15, 2024
paulijar added a commit that referenced this issue Aug 15, 2024
With PostgreSQL, uploading an image file caused an unhandled exception
Doctrine\DBAL\Exception\DriverException in case the target folder contained
songs of more than one album. Hence, the uploaded image wasn't immediately
used as a cover art for any album or artist. For album covers, the image was
pulled later by the background task but for artist cover, the file could be
detected only by running a new library scan.

The root cause was that the way used to handle the parameters of the SQL query
wasn't compatible with PgSQL.

refs #1164
@paulijar
Copy link
Collaborator

I did some testing, and indeed, I found a bug which could cause the automatic use of the uploaded cover art image to fail with PostgreSQL. This problem manifested itself in case the target folder contained audio files of more than one albums. In that case, there was an unhandled exception shown in the nextcloud.log after the image file upload: "Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: \"371,372\""

Do you think that you have hit this same bug? Can you find such an error from the log (the input shown in the end of the message would surely be different for you)? Anyway, I made a fix for this so this problem should be gone upon the next Music app release.

@neilarmstrongest
Copy link
Author

Thank you so much for your response.

My log is filled with these entries - "[core] Error: Exception thrown: Doctrine\DBAL\Exception
GET /core/preview?fileId=884044&x=32&y=32&mimeFallback=true&a=1&c=05e134f5d01582d4e0920a439d7f8f6b
from 192.168.1.249 by -- at 23 Aug 2024, 10:24:33 pm
"[core] Error: Exception thrown: Doctrine\DBAL\Exception
GET /core/preview?fileId=117349&x=32&y=32&mimeFallback=true&a=1&c=f76d87ec37a309322b84d441a810b98c
from 192.168.1.249 by -- at 23 Aug 2024, 10:24:33 pm
"

@paulijar
Copy link
Collaborator

Those log entries are probably not related to this artists image issue since those entries haven't been created in the context of the Music app but when the cloud core has created the thumbnail image for some file.

@paulijar
Copy link
Collaborator

paulijar commented Sep 8, 2024

New Music version 2.0.1 now contains fix for the PostgreSQL issue I mentioned above. Please reopen this or a new issue in case you find that something is still off with the artist image handling.

@paulijar paulijar closed this as completed Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants