Skip to main content
Pre-release

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 mutagen 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

Docs

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

ovos_media_provider_local-0.0.1a4.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_media_provider_local-0.0.1a4-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file ovos_media_provider_local-0.0.1a4.tar.gz.

File metadata

File hashes

Hashes for ovos_media_provider_local-0.0.1a4.tar.gz
Algorithm Hash digest
SHA256 3fdca2db307585908d431b7fa39763a2023efffae4739d17ec0ef49c2fc20b26
MD5 2f828c69d474531962ef89fd85b18fb5
BLAKE2b-256 ac6fcf5961c3dbe14924b6bbe9296cac745d076071296574bbbb68ba6b4f30a5

See more details on using hashes here.

File details

Details for the file ovos_media_provider_local-0.0.1a4-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_media_provider_local-0.0.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 c04895a2446c40414881f6f639e7f6505efa646afb106d45205fe0712c580210
MD5 b8329c5ee90463c64293773546ce5668
BLAKE2b-256 df7c45feafe7666db262036f90f4980d101bd4863de927247bf323f7160fed9a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1a4 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page