mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 16:08:00 +09:00
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
|
* Ignore hidden filenames
|
||||||
* Do not force playlist voiceover with auto playlists
|
* Do not force playlist voiceover with auto playlists
|
||||||
* Added shortcut parameters (-p, -t, -d, etc.)
|
* Added shortcut parameters (-p, -t, -d, etc.)
|
||||||
|
* Fix UnicodeEncodeError for non-ascii playlist names (#35)
|
||||||
|
|
||||||
1.3 Release (08.06.2016)
|
1.3 Release (08.06.2016)
|
||||||
* Directory based auto playlist building (--auto-dir-playlists) (#13)
|
* 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]
|
text = os.path.splitext(os.path.basename(filename))[0]
|
||||||
|
|
||||||
# Handle the VoiceOverData
|
# 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["dbid"] = hashlib.md5(text).digest()[:8] #pylint: disable-msg=E1101
|
||||||
self.text_to_speech(text, self["dbid"], True)
|
self.text_to_speech(text, self["dbid"], True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue