Skip to content

Other Useful Information

Here are some things you might need to know when using Swing Music.

Periodic Scans

The app periodically checks for new tracks and any changes to your library after 10 minutes. The following activities are performed:

  1. Rescaning directories for new music
  2. Extracting missing thumbnails
  3. Downloading missing artist images
  4. Extracting colors from the downloaded images
  5. Downloading similar artist data for discovered artists (Note: some artists don't have similar artist data)

If your library grows rapidly over a short period, ie. by adding new tracks often, you should leave the periodic scans on. You can also modify the duration between periodic scans by using the -psi flag like this:

sh
swingmusic -psi 10800 # 3hrs
swingmusic -psi 10800 # 3hrs

All the activities listed above are run on boot regardless of the -psi flag.

Watchdog

Swing Music watches for new music and file moves or deletes. The watcher does not work on mounted drives but works fine on the drive running the OS.

On Linux, you might get an inotify watch limit error:

Failed to start watchdog. [Errno 24] inotify instance limit reached
Failed to start watchdog. [Errno 24] inotify instance limit reached

You can fix it by increasing the watch limit. On Debian, Ubuntu, or similar:

sh
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

On Arch Linux:

sh
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

You can get more info on this StackOverflow thread.

Standalone Client

In v1.3.0, PWA support was added for mobile use, though it can also be used with desktop. That means you can install the client as an app on your desktop or phone.

On Mobile

The client is unusable as a mobile website due to the browser elements like the URL bar. Therefore, you need to install the client as an app.

If you don't get a prompt asking you to Add Swing Music to Home screen, click the 3 dots at the top right corner and select Add to Home screen.

On Desktop

In Chrome or Edge browser, click the install button in the URL bar.

Image showing PWA install in chrome desktop

Firefox desktop does not support the installation of PWAs on localhost. So it's not documented here.

Remote Access

To access your app from outside your local network, you need to set up a reverse proxy. Here are some tools I've tried:

  1. Ngrok
  2. localtunnel

A labor of love built by Mungai Njoroge