Merge pull request #1462 from croneter/fix-playlists
Make sure that the correct file system encoding is used for playlists
This commit is contained in:
commit
74a19966d2
1 changed files with 4 additions and 8 deletions
|
@ -668,14 +668,10 @@ PLEX_STREAM_TYPE_FROM_STREAM_TYPE = {
|
||||||
|
|
||||||
# Encoding to be used for our m3u playlist files
|
# Encoding to be used for our m3u playlist files
|
||||||
# m3u files do not have encoding specified by definition, unfortunately.
|
# m3u files do not have encoding specified by definition, unfortunately.
|
||||||
if DEVICE == 'Windows':
|
# The filesystem encoding is generally utf-8
|
||||||
M3U_ENCODING = 'mbcs'
|
# For Windows, it can be either utf-8 or mbcs
|
||||||
else:
|
# See https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding
|
||||||
M3U_ENCODING = sys.getfilesystemencoding()
|
M3U_ENCODING = sys.getfilesystemencoding()
|
||||||
if (not M3U_ENCODING or
|
|
||||||
M3U_ENCODING == 'ascii' or
|
|
||||||
M3U_ENCODING == 'ANSI_X3.4-1968'):
|
|
||||||
M3U_ENCODING = 'utf-8'
|
|
||||||
|
|
||||||
|
|
||||||
def database_paths():
|
def database_paths():
|
||||||
|
|
Loading…
Reference in a new issue