Skip to main content

Mopidy local library proxy extension for handling embedded album art

Project description

Mopidy-Local-Images is a Mopidy local library extension that allows Web clients access to album art embedded in local media files. It does so by acting as a proxy between Mopidy’s local scan command and the actual local library provider being used. Images are extracted from media files and stored as individual image files while scanning, and corresponding image URIs are inserted into Mopidy data models. Clients can then access these images through an included Mopidy Web extension. All other requests are delegated to the actual local library provider as-is.

Album art stored in separate files is also supported. External image files will be considered if they reside in the same directory as the scanned media files and file names match a configurable pattern.

Please note that support for local album art depends on whether your client supports album images as provided by Mopidy’s data model. For example, some clients will ignore any images provided by this extension, and will retrieve album art from external services instead.

Installation

Mopidy-Local-Images can be installed using pip by running:

pip install Mopidy-Local-Images

Configuration

Before starting Mopidy, you must change your configuration to switch to using Mopidy-Local-Images as your local library provider:

[local]
library = images

By default, Mopidy-Local-Images delegates any requests to the standard json local library provider. To use a third-party library, such as Mopidy-Local-SQLite, you have to set this in the local-images configuration section:

[local-images]
library = sqlite

Once this has been set, you need to clear and re-scan your library for images to be extracted:

mopidy local clear
mopidy local scan

This extension also provides some other configuration settings, but beware that these are subject to change for now:

[local-images]
enabled = true

# the actual local library provider to use
library = json

# the base URI for images; change this if you want to serve images
# using an alternative Web server, or when accessing Mopidy through a
# reverse proxy
base_uri = /images/

# the directory where local image files are stored; if not set,
# defaults to <local/data_dir>/images
image_dir =

# a list of file names to check for when searching for external album
# art; may contain UNIX shell patterns, i.e. "*", "?", etc.
album_art_files = *.jpg, *.jpeg, *.png

Project Resources

Latest PyPI version Number of PyPI downloads Travis CI build status Test coverage

License

Copyright (c) 2014, 2015 Thomas Kemmer.

Licensed under the Apache License, Version 2.0.

Known Bugs and Limitations

With Mopidy v0.19, using this extension will slow down mopidy local scan considerably, since every media file has to be scanned twice. This should no longer be a problem in Mopidy v1.0 and later versions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Mopidy-Local-Images-0.3.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

Mopidy_Local_Images-0.3.0-py2-none-any.whl (11.5 kB view details)

Uploaded Python 2

File details

Details for the file Mopidy-Local-Images-0.3.0.tar.gz.

File metadata

File hashes

Hashes for Mopidy-Local-Images-0.3.0.tar.gz
Algorithm Hash digest
SHA256 07f34a6472013b8f1ef34ff20379885f315fd2e36dcbcf4cc75689c7a2247932
MD5 e6754d8d18d9dc6052c8cb302f15b4cd
BLAKE2b-256 c30d744ec84f81bac095948b6ecc8d83ce60d5051ab431874a02184d63180314

See more details on using hashes here.

File details

Details for the file Mopidy_Local_Images-0.3.0-py2-none-any.whl.

File metadata

File hashes

Hashes for Mopidy_Local_Images-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 e4f1a4de6f68fef3579b1abac8629eecbf836091fc27305d83a07de3591f9d47
MD5 d14edf71b7163b01a209b1ac0ab1d3e2
BLAKE2b-256 71a8615c0ef2af3c55f0b7b875b91eb9b9ddb8b479b0fd389a918730cbe87485

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page