New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Track URI can cause crash #1340

Closed
blueyed opened this Issue Nov 28, 2015 · 4 comments

Comments

3 participants
@blueyed
Contributor

blueyed commented Nov 28, 2015

I've seen an issue where using an empty file URI (as file:) would crash ncmpcpp: http://bugs.musicpd.org/view.php?id=4468

I could imagine several ways to prevent this, e.g. by not returning lists with empty uris in lsinfo.
Another possibility might be to have something like blank=False for URI attributes in Track classes, but that's not so straight-forward (but I've some patch in this regard already).

The track comes from mopidy-soundcloud, where this should be fixed additionally, too.

What do you think?

@jodal

This comment has been minimized.

Member

jodal commented Nov 28, 2015

I don't think there's any valid use case for a track without an URI, so I'm +1 to filtering out any tracks without an URI. We could filter out these tracks in core, but as this is really a bug in Mopidy-SoundCloud combined with a bad fallback value in mopidy/mpd/translator.py:38 I propose to fix Mopidy-SoundCloud and the track_to_mpd_format() method.

@adamcik

This comment has been minimized.

Member

adamcik commented Nov 29, 2015

Are we somehow ending up with an uri of file: as in track.uri = 'file:' or do you mean in the MPD protocol sense?

@blueyed

This comment has been minimized.

Contributor

blueyed commented Nov 29, 2015

.uri is empty, and results in file: then.

@jodal jodal self-assigned this Jan 1, 2016

jodal added a commit to jodal/mopidy that referenced this issue Jan 1, 2016

jodal added a commit to jodal/mopidy that referenced this issue Jan 1, 2016

@jodal

This comment has been minimized.

Member

jodal commented Jan 3, 2016

I consider this fixed by the combination of #1343 (MPD), #1381 (core) and mopidy/mopidy-soundcloud#62.

@jodal jodal closed this Jan 3, 2016

@jodal jodal added A-core A-mpd labels Jan 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment