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

remove leftover utf-8 encode from path handling #1611

Merged
merged 1 commit into from Mar 30, 2018

Conversation

3 participants
@BernhardGehl
Contributor

BernhardGehl commented Apr 4, 2017

Leaving the .encode in the code causes folders with non-ASCII symbols (tested with some German umlauts) to show up empty in "browse".

After removing, the folder contents show up fine.

(If this gets merged, I don't have to patch my kids' three mediaplayers for their "Hörspiele" (audiobooks) folder everytime a new Mopidy version gets installed. It's just daddy, trying to save some of his time... ;-) )

remove leftover utf-8 encode from path handling
Reaving the .encode in the code causes folders with non-ASCII symbols (tested with some German umlauts) to show up empty in "browse".
After removing, the folder contents show up fine.
@jodal

This comment has been minimized.

Member

jodal commented Apr 7, 2017

This will probably be adressed by our upcoming switch from handling paths as bytes to handling them as unicode text, which is a part of our porting to Python 3.

@jodal jodal self-assigned this Apr 7, 2017

@adamcik

This comment has been minimized.

Member

adamcik commented Jun 14, 2017

@jodal since waiting for the p3 work to happen is potentially a while out does it make sense to merge this?

@jodal

This comment has been minimized.

Member

jodal commented Jun 14, 2017

I don't remember enough how our path functions works with regards to mixed bytes and text to be confident in merging this without looking at the larger picture.

@BernhardGehl

This comment has been minimized.

Contributor

BernhardGehl commented Sep 24, 2017

@jodal

jodal approved these changes Mar 30, 2018

After review of mopidy/file/library.py I've come to the conclusion that all paths in self._media_dirs already are bytestrings, and are thus already encoded.

I agree that the proposed fix is correct.

I'm sorry this has taken me a year to get around to.

@jodal jodal merged commit 87ff8d9 into mopidy:develop Mar 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jodal jodal added this to the v2.2 milestone Mar 30, 2018

@BernhardGehl

This comment has been minimized.

Contributor

BernhardGehl commented Mar 31, 2018

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