forked from upstream/IPod-Shuffle-4g
utf encode playlist names, fixes #35
This commit is contained in:
parent
e5322ce9f8
commit
78ecedd8d5
2 changed files with 3 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ Original data can be found via [wayback machine](https://web.archive.org/web/201
|
|||
* Ignore hidden filenames
|
||||
* Do not force playlist voiceover with auto playlists
|
||||
* Added shortcut parameters (-p, -t, -d, etc.)
|
||||
* Fix UnicodeEncodeError for non-ascii playlist names (#35)
|
||||
|
||||
1.3 Release (08.06.2016)
|
||||
* Directory based auto playlist building (--auto-dir-playlists) (#13)
|
||||
|
|
|
|||
|
|
@ -545,6 +545,8 @@ class Playlist(Record):
|
|||
text = os.path.splitext(os.path.basename(filename))[0]
|
||||
|
||||
# Handle the VoiceOverData
|
||||
if isinstance(text, unicode):
|
||||
text = text.encode('utf-8', 'ignore')
|
||||
self["dbid"] = hashlib.md5(text).digest()[:8] #pylint: disable-msg=E1101
|
||||
self.text_to_speech(text, self["dbid"], True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue