Open khughitt opened 9 years ago
Same here. Somehow lookup_future.get()in lsinfo in mopidy/mpd/protocol/music_db.py returns [] for some songs. I have no idea why. I looked at all the Track elements returned by SoundCloudClient.get_user_stream() and they seem just fine.
As a dirty fix this worked for me:
replace
result = []
for path, lookup_future in context.browse(uri, recursive=False):
if not lookup_future:
result.append(('directory', path.lstrip('/')))
else:
tracks = lookup_future.get()
if tracks:
result.extend(translator.track_to_mpd_format(tracks[0]))
with
result = []
for path, lookup_future in context.browse(uri, recursive=False):
if not lookup_future:
result.append(('directory', path.lstrip('/')))
else:
tracks = lookup_future.get()
if filter(None, tracks):
result.extend(translator.track_to_mpd_format(tracks[0]))
in the lsinfo function of mopidy/mpd/protocol/music_db.py
Using ncmcpp as a front-end, whenever I try and load my liked stream, an exception is raised by the server, e.g.:
As far as I can tell though, the API response looks okay:
I couldn't figure out how to spawn a PDB session at that point (any suggestions?), but adding a print statement showed that the
track
is an empty list, "[]".System info:
Any suggestions? I'm happy to help track down the issue, but not sure of how to get into PDB. I tried both hard-coding a 'import pdb; pdb.set_trace()' and launching from the CLI:
But perhaps because of the threading used, It does not open up PDB.