#2155·mopidy

core.tracklist.add does not support m3u uris

Author: benreid24Created Mar 2, 2024Updated Sep 23, 2026
LabelsA-ext-m3u

Describe the bug I am using the core.tracklist.add method from a Home Assistant automation to add all songs from a local m3u playlist. Passing the URI of the playlist results in no tracks being added on the backend.

Looking through the code it appears that the add method relies on the LibraryProvider of the backends to get a track list from a URI. The m3u extension is missing a LibraryProvider. I have implemented one and am opening this issue, as per the guidelines, prior to making my pull request.

How to reproduce

  1. Have a m3u playlist loaded into Mopidy
  2. Call core.tracklist.add with the playlist uri
  3. Observe that the tracklist is unmodified

Expected behaviour All tracks in the m3u playlist should get added to the tracklist. The Spotify backend behaves in this manner.

Environment Please complete the following information:

  • Operating system: Macos
  • Running Mopidy as a service or in the terminal? Both
  • Your config (output of sudo mopidyctl config)
... [snipped]
[file]
enabled = true
media_dirs = 
  ~/Music|Home

[m3u]
enabled = true
base_dir = ~/Music
default_encoding = utf8
default_extension = .m3u8
playlists_dir = ~/Music/Playlists
  • Software versions: Running from source on latest commit b9e7a8feffb5ff
  • Any specific hardware: No

Additional context N/A