Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Koel
  3. Koel - Spotify integration - unable to save album art

Koel - Spotify integration - unable to save album art

Scheduled Pinned Locked Moved Unsolved Koel
11 Posts 4 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V Offline
      V Offline
      vansens
      wrote on last edited by
      #1

      Hi,
      Koel 6.11.2

      Enabled 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!

      1 Reply Last reply
      1
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @vansens Fixed in the latest package. Can you please update and try?

        V 1 Reply Last reply
        1
        • girishG girish

          @vansens Fixed in the latest package. Can you please update and try?

          V Offline
          V Offline
          vansens
          wrote on last edited by
          #3

          @girish thank you that did the trick

          1 Reply Last reply
          0
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon has marked this topic as solved on
          • V Offline
            V Offline
            vansens
            wrote on last edited by
            #4

            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 flag

            In 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.

            1 Reply Last reply
            0
            • nebulonN Away
              nebulonN Away
              nebulon
              Staff
              wrote on last edited by
              #5

              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?

              1 Reply Last reply
              0
              • nebulonN nebulon has marked this topic as unsolved on
              • nebulonN Away
                nebulonN Away
                nebulon
                Staff
                wrote on last edited by
                #6

                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.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vansens
                  wrote on last edited by
                  #7

                  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

                  1 Reply Last reply
                  1
                  • V Offline
                    V Offline
                    vansens
                    wrote on last edited by
                    #8

                    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?

                    1 Reply Last reply
                    0
                    • KinziK Offline
                      KinziK Offline
                      Kinzi
                      wrote on last edited by
                      #9

                      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

                      1 Reply Last reply
                      1
                      • nebulonN Away
                        nebulonN Away
                        nebulon
                        Staff
                        wrote on last edited by
                        #10

                        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.

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          vansens
                          wrote on last edited by
                          #11

                          Hey @nebulon thanks for letting us know you can reproduce the issue. I will keep an eye on this thread but probably move away from using Koel for the time being.
                          Again, thanks for all your help and time!

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search