Koel - Spotify integration - unable to save album art
-
Hi,
Koel 6.11.2Enabled Spotify integration as per https://docs.koel.dev/3rd-party.html#spotify
by editing /app/data/env and adding lines for SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET
Issue: covers do not show
/app/data/storage/logs/laravel/log shows an error repeatedly:
2023-05-05 21:48:00] production.ERROR: Failed attempt {"error":"[object] (Intervention\Image\Exception\NotWritableException(code: 0): Can't write image data to path (/app/code/public/img/covers/5a1d28813cebd94da689576867f617a31abe3bde.jpeg) at /app/code/vendor/intervention/image/src/Intervention/Image/Image.php:150)
[stacktrace]
#0 /app/code/app/Services/ImageWriter.php(36): Intervention\Image\Image->save()
#1 /app/code/app/Services/MediaMetadataService.php(38): App\Services\ImageWriter->write()
#2 /app/code/app/Helpers.php(50): App\Services\MediaMetadataService->App\Services\{closure}()
#3 /app/code/app/Services/MediaMetadataService.php(46): attempt()
#4 /app/code/app/Services/FileSynchronizer.php(119): App\Services\MediaMetadataService->writeAlbumCover()
#5 /app/code/app/Helpers.php(50): App\Services\FileSynchronizer->App\Services\{closure}()
#6 /app/code/app/Services/FileSynchronizer.php(131): attempt()
#7 /app/code/app/Services/FileSynchronizer.php(94): App\Services\FileSynchronizer->tryGenerateAlbumCover()
#8 /app/code/app/Services/MediaSyncService.php(51): App\Services\FileSynchronizer->sync()
#9 /app/code/app/Console/Commands/SyncCommand.php(68): App\Services\MediaSyncService->sync()
#10 /app/code/app/Console/Commands/SyncCommand.php(46): App\Console\Commands\SyncCommand->syncAll()
#11 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\SyncCommand->handle()
#12 /app/code/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#13 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#14 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#15 /app/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\Container\BoundMethod::call()
#16 /app/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call()
#17 /app/code/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#18 /app/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\Component\Console\Command\Command->run()
#19 /app/code/vendor/symfony/console/Application.php(1014): Illuminate\Console\Command->run()
#20 /app/code/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#21 /app/code/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#22 /app/code/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#23 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#24 /app/code/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#25 {main}
"}Thanks for looking into it!
-
@vansens Fixed in the latest package. Can you please update and try?
-
-
-
Hi @girish this is unfortunately not quite resolved - the errors are gone, but I do not get any covers showing in Koel. (I only had time to look at this today)
Here's my setup:
S3FS mount point on /mnt/music with the Read-Only flagIn Cloudron->Volumes I have a volume called "music" pointing to /mnt/music
In Koel-Terminal I created a symlink in /app/data/library:
lrwxrwxrwx 1 www-data www-data 13 May 8 16:29 music -> /media/music/
In the Koel admin interface, I have set up the media folder to point to /app/data/library
Scanning the library from Koel-Terminal via
php artisan koel:sync
picks up the mp3s but not the covers.
-
I was trying to test the spotify integration now, but even after adding the client ID and secret, then restarting the app, I don't have any UI or any indication that spotify is used or available. @vansens was there anything specific you had to do and how would the integration work? Also which spotify app callback URL have you specified when creating the client in spotify developer portal?
-
-
So it seems the spotify integration only does metadata fetching, however I have downloaded a few albums from https://www.jamendo.com/ which are also on spotify and I have no clue now how to trigger this spotify backend.
php artisan koel:sync --force
just succeeds but does not fetch anything there.
-
I have followed the steps in
https://docs.koel.dev/3rd-party.html#spotify
but I did not set a callback URL at all.Maybe it's just Koel not quite working well. Let me set up a non-Cloudron Koel docker instance on another VPS and play around with it.
Generally, all my mp3's contain cover art and each album folder also contains a cover.jpg file, so I shouldn't even need Spotify integration.
I'll report back with my findings -
I installed the koel/docker image on a test system and all works well.
It finds/displays the covers properly. I am not sure if Koel is using the cover.jpg file or the embedded cover file.
I didn't even need to set up Spotify integration.On this setup, there is a docker volume called docker_covers. In that volume, there are 2 files for each album: *.jpeg and *.thumb.jpeg
I don't know enough about how Cloudron is managing these volumes for Koel - can you tell me where the equivalent folder/volume for covers on a Cloudron would be?
-
I have the same problem. Spotify connected following this: https://docs.koel.dev/3rd-party.html#spotify
But the album covers do not sync.Apparently they are supposed to sync when a song is played and does not have a cover yet:
https://github.com/koel/koel/issues/1678#issuecomment-1545476310 -
I do wonder if the package misses some basic library to detect songs to match with services like spotify. I have not managed to get a single cover art or such in any songs I have tried. Sadly even in debug mode does the app not give any indication on failure to fetch or detect. I am a bit at a loss on where to look further.