Failed to add some tracks in Iris - what could be the reason?

Hey there,
after migrating my music to mopidy and one of my last steps is to take over my playlists.
For 90% of the titles in my playlists everything works fine. But for some entries i do not yet understand whats going wrong.
In mopidy iris these “bad” entries are only shown as an uri like:
local:track:The%20Prodigy/Invaders%20Must%20Die/02%20Omen.mp3
and when i try to play them i get the message “Failed to add some tracks”.
I also tried to verify all these bad uris in my playlists via e g.
os.path.isfile(file) but the files are existing/known/visible.
Also setting mopidy verbosity to 4 sadly did not show anything when reproducing the issue.

Has somebody experienced simliar behaviour with playlists or has an idea what to check next/what could mopidy/iris make failing to add these tracks?

Looking forward to your replies,
thanks!

General infos:
mopidy is running as a service.
Music folder is owned (rwx) by mopidy user
running on RasPi4 with Buster

Is this problem isolated to Iris? There have been a bunch of urlencoding issues lately (one is Unable to play local media Album/Artist from playlist · Issue #708 · jaedb/Iris · GitHub). If you can reproduce the issue with other web clients / MPD clients then we can investigate here. Otherwise I am going to suggest you use the Iris issue tracker.

thanks for the quick response.
I tried with mpd, Mopidy Muse and Mopidy Mobile app on android - looks like problem is NOT isolated to iris. mpd just does not show the “bad” tracks at all, in mobile app also just the uris are shown and its not possible to play them.

Would you mind to sketch up the chain whats happening in the background when “play track/play now/…” is pressed so that we can find out which part is actually not working?

I’d prefer you provided the debug log while reproducing the problem. And the output from sudo mopidyctl config and sudo mopidyctl deps. Details available at the troubleshooting page in our documentation.

You can see what happens in Mopidy’s core library and tracklist components. It takes the uri,does a lookup using the backend identified by the uri scheme to get a Track, adds that to the tracklist. The debug log should show anything going wrong there preventing certain tracks not being displayed.

How did you “take over” your playlists, what does that mean?

Here is the log

Log using Mopidy Mobile App

Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.20: ‘{“method”:“core.playback.get_current_tl_track”,“jsonrpc”:“2.0”,“id”:48}’
Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.20: ‘{“jsonrpc”: “2.0”, “id”: 48, “result”: null}’
Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.20: ‘{“method”:“core.tracklist.add”,“params”:{“uris”:[“local:track:Foreigner/Unknown%20Album/Cold%20as%20Ice.mp3”]},“jsonrpc”:“2.0”,“id”:49}’
Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.20: ‘{“jsonrpc”: “2.0”, “id”: 49, “result”: }’
Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.20: ‘{“method”:“core.playback.play”,“params”:{},“jsonrpc”:“2.0”,“id”:50}’
Mar 27 12:36:57 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.20: ‘{“jsonrpc”: “2.0”, “id”: 50, “result”: null}’

Log using Iris

– Logs begin at Sat 2021-03-27 12:40:27 CET. –
Mar 27 12:40:46 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.29: ‘{“jsonrpc”: “2.0”, “id”: 131, “result”: {“local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3”: [{“model”: “Track”, “uri”: “local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3”, “name”: “Wheels”, “artists”: [{“model”: “Artist”, “uri”: “local:artist:md5:e98da64289c09eec2fea1c288319de39”, “name”: “Foo Fighters”}], “album”: {“model”: “Album”, “uri”: “local:album:md5:a2a26b92cab067bf0ebc7a8d0ac924c0”, “name”: “Greatest Hits”, “date”: “2009-06-08”}, “genre”: “Pop”, “track_no”: 14, “date”: “2009-06-08”, “length”: 271386, “bitrate”: 127993, “comment”: “www.radio-fx.de”, “last_modified”: 1306675224000}], “local:track:GEORGE%20MICHAEL/Unknown%20Album/FAITH%201.mp3”: , “local:track:Foreigner/Unknown%20Album/Cold%20as%20Ice.mp3”: }}’
Mar 27 12:41:04 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.29: ‘{“method”:“core.tracklist.add”,“params”:{“uris”:[“local:track:Foreigner/Unknown%20Album/Cold%20as%20Ice.mp3”],“at_position”:0},“jsonrpc”:“2.0”,“id”:132}’
Mar 27 12:41:04 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.29: ‘{“jsonrpc”: “2.0”, “id”: 132, “result”: }’
Mar 27 12:41:08 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.29: ‘{“method”:“core.tracklist.add”,“params”:{“uris”:[“local:track:GEORGE%20MICHAEL/Unknown%20Album/FAITH%201.mp3”],“at_position”:0},“jsonrpc”:“2.0”,“id”:133}’
Mar 27 12:41:08 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.29: ‘{“jsonrpc”: “2.0”, “id”: 133, “result”: }’

LAST TRACK WORKS:

Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.29: ‘{“method”:“core.tracklist.add”,“params”:{“uris”:[“local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3”],“at_position”:0},“jsonrpc”:“2.0”,“id”:134}’
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Core-6] mopidy.core.tracklist Triggering event: tracklist_changed()
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Core-6] mopidy.listener Sending tracklist_changed to CoreListener: {}
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [MpdFrontend-9] mopidy.listener Sending playlist to MpdSession: {}
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.29: ‘{“jsonrpc”: “2.0”, “id”: 134, “result”: [{“model”: “TlTrack”, “tlid”: 1, “track”: {“model”: “Track”, “uri”: “local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3”, “name”: “Wheels”, “artists”: [{“model”: “Artist”, “uri”: “local:artist:md5:e98da64289c09eec2fea1c288319de39”, “name”: “Foo Fighters”}], “album”: {“model”: “Album”, “uri”: “local:album:md5:a2a26b92cab067bf0ebc7a8d0ac924c0”, “name”: “Greatest Hits”, “date”: “2009-06-08”}, “genre”: “Pop”, “track_no”: 14, “date”: “2009-06-08”, “length”: 271386, “bitrate”: 127993, “comment”: “asdf”, “last_modified”: 1306675224000}}]}’
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.29: ‘{“method”:“core.playback.play”,“params”:{“tlid”:1},“jsonrpc”:“2.0”,“id”:135}’
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Audio-2] mopidy.audio.gst Changing state to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [MainThread] mopidy.audio.gst Got STATE_CHANGED bus message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_VOID_PENDING
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [LocalBackend-5] mopidy.backend Backend translated URI from local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3 to file:///media/nasmusic/Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Audio-2] mopidy.audio.actor Flags: 2
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [SoftwareMixer-1] mopidy.mixer Mixer event: volume_changed(volume=100)
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [SoftwareMixer-1] mopidy.listener Sending volume_changed to MixerListener: {‘volume’: 100}
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Audio-2] mopidy.audio.gst Got source-setup signal: element=GstFileSrc
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Audio-2] mopidy.audio.gst Changing state to GST_STATE_PLAYING: result=GST_STATE_CHANGE_ASYNC
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [Core-6] mopidy.listener Sending volume_changed to CoreListener: {‘volume’: 100}
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Sent WebSocket message to 192.168.178.29: ‘{“jsonrpc”: “2.0”, “id”: 135, “result”: null}’
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [HttpServer] mopidy.http.handlers Received WebSocket message from 192.168.178.29: ‘{“method”:“core.tracklist.get_tl_tracks”,“params”:{},“jsonrpc”:“2.0”,“id”:136}’
Mar 27 12:41:18 pimusic mopidy[15882]: DEBUG [MpdFrontend-9] mopidy.listener Sending mixer to MpdSession: {}

Here some images how it looks like for me:
Capture

Deps:

Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps” as user mopidy
INFO [MainThread] mopidy.main Starting Mopidy 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-File 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.1.1
DEBUG [MainThread] mopidy.ext Loading entry point: muse = mopidy_muse:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-Muse 0.0.24
DEBUG [MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.1.0
DEBUG [MainThread] mopidy.ext Loading entry point: local = mopidy_local:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-Local 3.2.0
DEBUG [MainThread] mopidy.ext Loading entry point: iris = mopidy_iris:Extension
DEBUG [MainThread] mopidy.ext Loaded extension: Mopidy-Iris 3.57.3
DEBUG [MainThread] mopidy.ext Discovered extensions: file, http, m3u, softwaremixer, stream, muse, mpd, local, iris
DEBUG [MainThread] mopidy.config.keyring Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11)
INFO [MainThread] mopidy.config Loading config from builtin defaults
INFO [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
INFO [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
INFO [MainThread] mopidy.config Loading config from command line options
DEBUG [MainThread] mopidy.ext Validating extension: file
DEBUG [MainThread] mopidy.ext Validating extension: http
DEBUG [MainThread] mopidy.ext Validating extension: m3u
DEBUG [MainThread] mopidy.ext Validating extension: softwaremixer
DEBUG [MainThread] mopidy.ext Validating extension: stream
DEBUG [MainThread] mopidy.ext Validating extension: muse
DEBUG [MainThread] mopidy.ext Validating extension: mpd
DEBUG [MainThread] mopidy.ext Validating extension: local
DEBUG [MainThread] mopidy.ext Validating extension: iris
INFO [MainThread] mopidy.main Enabled extensions: http, mpd, local, muse, iris, stream, softwaremixer, m3u
INFO [MainThread] mopidy.main Disabled extensions: file
Executable: /usr/bin/mopidy
Platform: Linux-5.10.17-v7l±armv7l-with-debian-10.8
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
tornado: 6.1 from /usr/local/lib/python3.7/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.1.0 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-Muse: 0.0.24 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-Local: 3.2.0 from /usr/local/lib/python3.7/dist-packages
uritools: 3.0.0 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-Iris: 3.57.3 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad

Config

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 4
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume =
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[file]
enabled = false ; Extension disabled by user config.

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir = /media/nasmusic/
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /home/pi/playlists

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[muse]
enabled = true
mopidy_host = localhost
mopidy_port = 6680
mopidy_ssl = false
snapcast_host = localhost
snapcast_port = 1780
snapcast_ssl = false

[mpd]
enabled = true
hostname = ::
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall

listallinfo
default_playlist_scheme = m3u

[local]
enabled = true
max_search_results = 100
media_dir = /media/nasmusic/
scan_timeout = 5000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
.flac
.mp3
.aac
.m4a
excluded_file_extensions =
.cue
.directory
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
Last Week’s Updates local:directory?max-age=604800
Last Month’s Updates local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files =
*.jpg
*.jpeg
*.png

[iris]
enabled = true

regarding your 2nd question:
Previously i had everything organized by and with iTunes (shame on me) so also my playlists originate from there.
While “migrating” i did the following:
a) configure modipy to use the files from the same location/folder structure itunes did
b) write a script to extract the playlists from itunes xml and translate them into m3u8 by basically manipulating the path.

b) works for majority of the files, but there seems to be a special case if have not found yet and i am trying to investigate.

So, you created the paths within your playlist files yourself? They were not given to you by Mopidy?

What happens when you try to find these troublesome tracks by using the Browse methods and the look at their actual Uri?

yes, i created myself and verified existens/correctness of the path in my python script with e.g. os.path.isfile() - but looks like this check is not sufficient.

BAD:
local:track:GEORGE%20MICHAEL/Unknown%20Album/FAITH%201.mp3
OK:
local:track:George%20Michael/Unknown%20Album/FAITH%201.mp3

BAD:
local:track:Foreigner/Unknown%20Album/Cold%20as%20Ice.mp3
OK:
local:track:FOREIGNER/Unknown%20Album/Cold%20as%20Ice.mp3

OK:
local:track:Foo%20Fighters/Greatest%20Hits/14%20Wheels.mp3

so it looks like randomly UPPERCASE is working/not working and i have to catch this in my m3u8 generation script. I still do not get why the os.path.isfile() check is not catching these troublesome tracks - i have to further investigate.

The other you can do is, other than verify the URIs using Mopidy’s browsing functionality, is ensure they were actually added to the Local database when you scanned. It should error for tracks it cant add for some reason. You can also verify the scanning with this.

In general we suggest people don’t try to generate URIs themselves but with playlists that idea breaks down pretty quickly.

Thanks @kingosticks, i will go that way.

One final question - is there a way to get all uris known to mopidy?
1st think is to remove the troublesome uris (i will use your proposed solution)
2nd would be to replace them with proper ones - question then is what is known to mopidy.

EDIT:

Okay, no stuff is getting strange - local scan - in contrast to something different in the chain - seems to be NOT case-sensitive and i am not able to filter troublesome uris with this approach. see output below.

I am currently trying to check the same using Mopidy’s browsing functionality as suggested. But i am new to the code and not yet clear how to do so. Is there an easy way to include this functionality in a script for testing?

troublesome uri from above

pi@pimusic:~ $ python3 -m mopidy.audio.scan file:///media/nasmusic/GEORGE%20MICHAEL/Unknown%20Album/FAITH%201.mp3
2021-03-27 16:25:57,791 TRACE element decodebin0: have-audio;
2021-03-27 16:25:57,794 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:25:57,795 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:25:57,796 TRACE element pipeline0: GstMessageAsyncDone, running-time=(guint64)18446744073709551615;
2021-03-27 16:25:57,797 DEBUG Using workaround for duration missing before play.
2021-03-27 16:25:57,800 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:25:57,801 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:25:57,813 TRACE element mpegaudioparse0: GstMessageDurationChanged;
uri file:///media/nasmusic/GEORGE%20MICHAEL/Unknown%20Album/FAITH%201.mp3
mime None
duration 157956
playable True
seekable True
tags
title [‘FAITH’]
artist [‘GEORGE MICHAEL’]
datetime [‘0019’]
genre [‘disco’]
container-format [‘ID3 tag’]
extended-comment ['iTunNORM[en]= 0000014B 0000017D 00001EE1 00001632 00…
has-crc [False]
channel-mode [‘joint-stereo’]
audio-codec [‘MPEG-1 Layer 3 (MP3)’]
nominal-bitrate [112000]
minimum-bitrate [111781]
maximum-bitrate [112087]
bitrate [111985]

working uri from above

pi@pimusic:~ $ python3 -m mopidy.audio.scan file:///media/nasmusic/George%20Michael/Unknown%20Album/FAITH%201.mp3
2021-03-27 16:27:06,278 TRACE element decodebin0: have-audio;
2021-03-27 16:27:06,281 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:27:06,282 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:27:06,283 TRACE element pipeline0: GstMessageAsyncDone, running-time=(guint64)18446744073709551615;
2021-03-27 16:27:06,284 DEBUG Using workaround for duration missing before play.
2021-03-27 16:27:06,286 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:27:06,288 TRACE element fakesink0: GstMessageTag, taglist=(taglist)"taglist,\ title=(string)FAITH,\ artist.…
2021-03-27 16:27:06,299 TRACE element mpegaudioparse0: GstMessageDurationChanged;
uri file:///media/nasmusic/George%20Michael/Unknown%20Album/FAITH%201.mp3
mime None
duration 157956
playable True
seekable True
tags
title [‘FAITH’]
artist [‘GEORGE MICHAEL’]
datetime [‘0019’]
genre [‘disco’]
container-format [‘ID3 tag’]
extended-comment ['iTunNORM[en]= 0000014B 0000017D 00001EE1 00001632 00…
has-crc [False]
channel-mode [‘joint-stereo’]
audio-codec [‘MPEG-1 Layer 3 (MP3)’]
nominal-bitrate [112000]
minimum-bitrate [111781]

When Mopidy-Local scans the filesystem, the Track uris it creates and inserts into the database match what the filesystem provided it with. The lookup(uri) that happens when adding to the tracklist is case-sensitive and so the uri you provide must match the actual path on the filesystem exactly.

On a regular Linux system with a common case-sensitive filesystem (e.g. ext3, ext4 etc), Mopidy’s lookup behaviour matches the filesystem behaviour, and os.path.isfile(x) != os.path.isfile(x.upper()). But network drives are sometimes formatted with a more Windows-like case-insensitive filesystem (such as FAT32). Mounting and using that on linux get you os.path.isfile(x) == os.path.isfile(x.upper()). Could this be what you are seeing?

I am currently trying to check the same using Mopidy’s browsing functionality as suggested. But i am new to the code and not yet clear how to do so. Is there an easy way to include this functionality in a script for testing?

Most web clients and MPD clients already support Mopidy’s browse functionality. mpc is simplest:

mpc ls "Local media/Artists/GEORGE MICHAEL"

One final question - is there a way to get all uris known to mopidy?

mpc ls "Local media/Tracks"
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.