swingmx / swingmusic

Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music.
https://swingmx.com
MIT License
666 stars 41 forks source link

No Album Art Loading #164

Closed tpatchg closed 5 months ago

tpatchg commented 5 months ago

I am not getting any type of timezone errors in the log, so don't believe it is that issue. Using docker compose on x86. The data/music files have 1000:1000 permission and can access just fine inside docker. They all play just fine, load artist, album, but no image gets loaded.

services:
  swingmusic:
    image: ghcr.io/swing-opensource/swingmusic:latest
    container_name: swingmusic
    networks:
      - proxy
    volumes:
      - /data/music:/music
      - /data/dockers/swing:/config
      #- /etc/timezone:/etc/timezone

networks:
  proxy:
    external: true

And here is a full logs --follow from a clean boot. Load site, pick /music, and the error after scanning the files.


------------------------------
SwingMusic 1.4.6
Started app on:
➤ http://localhost:1970
➤ http://10.86.22.3:1970
------------------------------

Data folder: /config/swingmusic
Loading tracks... Done!
Loading albums... Done!
Loading artists... Done!
INFO|Validating tracks ...
  0%|                                             |0/0
WatchDogInfo: No root directories configured. Watchdog not started.
The root directory is not configured. Open the app in your webbrowser to configure.
Rebuilding library...
Loading tracks... Done!
Loading albums... Done!
Loading artists... Done!
INFO|Validating tracks ...
  0%|                                             |0/0
Found 52 new tracks
INFO|Reading files ...
100%|█████████████████████████████████████████████|52/52
Adding 52 tracks to database
Added 52/52 tracks
Exception in thread Thread-18 (rebuild_store):
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "app/api/settings.py", line 56, in rebuild_store
  File "app/lib/populate.py", line 86, in __init__
  File "app/lib/populate.py", line 268, in __init__
  File "concurrent/futures/thread.py", line 144, in __init__
ValueError: max_workers must be greater than 0

What can I do to further to test or rectify this?

cwilvx commented 5 months ago

Hello @tpatchg

Thanks for opening this issue. The max_workers error is happening because 1 cpu core is detected. The app is supposed to use only half of the cores detected.

I will patch it up to use all cpu cores if the number of cpu cores is less than 2. If you want to to fix the issue without any patch, you need to assign more than 2 cpu cores to it.

In the meantime, I will build a patch for you however. I'll add a comment with the build in this issue.

Thank you.

cwilvx commented 5 months ago

@tpatchg

Use the patch instead of v1.4.6 latest:

docker pull ghcr.io/swing-opensource/swingmusic:v1.4.6_cpu_cores_patch

Let me know whether it fixes the problem.

Thank you.

cwilvx commented 5 months ago

@tpatchg

The patch has been pushed to v1.4.6 ie. latest. You can now safely use that one.