This release is a pre-release and may not be stable for production use.
ovos-media-provider-local
OVOS MediaProvider plugin for a local file-system media library.
Given a parsed media request, it searches one or more configured directories
on disk and returns ranked, playable mediavocab.Release objects with
file:// uris. Instead of a fixed set of MediaType subfolders and a bus
listener, this provider is loaded in-process by the OCP pipeline and its
search() is called directly. It supersedes the catalog/search half of the
legacy OCP skill
ovos-skill-local-media.
Routing
| Axis | Value |
|---|---|
media |
MUSIC, MOVIE |
playback_type |
AUDIO, VIDEO |
genre_filter |
(none) |
Install
pip install ovos-media-provider-local
Configure
Per-provider settings live under media_providers in mycroft.conf, keyed
by the provider's entry-point name:
{
"media_providers": {
"local": {
"paths": ["~/Music", "~/Videos", "/mnt/media"],
"max_results": 10,
"min_confidence": 0.3
}
}
}
| Key | Default | Description |
|---|---|---|
paths |
$XDG_MUSIC_DIR/~/Music, $XDG_VIDEOS_DIR/~/Videos |
Directories scanned recursively for media files. |
max_results |
10 |
Maximum number of matching files returned per search. |
min_confidence |
0.3 |
Files scoring below this are dropped from the results. |
Set "enabled": false to disable without uninstalling.
How it works
Every audio/video file under a configured path is indexed once and re-used
across searches; the index is rebuilt on the next search() call only for
files whose mtime changed or that are new, and entries for files that
disappeared are dropped. There is no background thread — the refresh runs
synchronously at the start of search().
Tags are read with tinytag where the
format supports it (title/artist/album/genre/duration). A file with no
readable tags falls back to a title derived from its filename. search()
scores each candidate with fuzzy_match against the query title, with a
bonus when the requested artist is tagged on the file; a bare browse request
(no title, no artist) returns the whole library at a flat low confidence
instead of favouring one arbitrary file.
Related projects
- ovos-skill-local-media: the legacy OCP search skill this provider supersedes
- mediavocab: the
Release/Signals/Worktypes this provider returns and consumes - ovos-plugin-manager: defines the
MediaProvidertemplate andopm.media.providerplugin type
Docs
- docs/index.md: overview and how it fits the ovos-media stack
Tests
pip install -e .[test]
pytest test/
Tests use real fixture files generated under tmp_path (a tag-less WAV built
with the stdlib wave module, plus a tiny tagged MP3 synthesized with
ffmpeg where available). Tests that need the tagged MP3 are skipped, not
failed, when ffmpeg is not on PATH.
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_media_provider_local-0.0.1a5.tar.gz.
File metadata
- Download URL: ovos_media_provider_local-0.0.1a5.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
590efea4dca8def49940bc481cf8bf3ab4577989a104e9f196ed4892b2886f78
|
|
| MD5 |
51185ecdfcbe3c75a60b786591623235
|
|
| BLAKE2b-256 |
a5533e9bc314e0816dbd541b12975d7b27c9781f98596589e5e8e4fc75f8490f
|
File details
Details for the file ovos_media_provider_local-0.0.1a5-py3-none-any.whl.
File metadata
- Download URL: ovos_media_provider_local-0.0.1a5-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b33db33222797dac63ce64d5268b6a45fe0b052d1298e425d77d961ca328f34
|
|
| MD5 |
f7b02b48116000d7e7dd3aea08eeffe0
|
|
| BLAKE2b-256 |
dbd229dc132e5114f6d5982dc118524e8d737ee17a909593f0a78bb2213b6acd
|