owncloud / music

:notes: Music app for ownCloud
GNU Affero General Public License v3.0
568 stars 198 forks source link

Adding Artist Images #1164

Closed neilarmstrongest closed 1 month ago

neilarmstrongest commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 1 month ago

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.